Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Division by zero #34

Open
xandrefreire opened this issue May 29, 2024 · 0 comments
Open

Division by zero #34

xandrefreire opened this issue May 29, 2024 · 0 comments

Comments

@xandrefreire
Copy link

xandrefreire commented May 29, 2024

Hello,

Thank you for this library.

Potential unhandled crash: Division by Zero

I have identified a runtime crash issue caused by division by zero. For instance, the following code snippet causes the library to crash:

let rule =
"""
{ "/" : [10, 0] }
"""

// Example parsing
let result: String? = try? JSONLogicClient.applyRule(rule, to: nil)

print("result = \(String(describing: result))")

This pull request #33 implements a fix to prevent this crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant