Skip to content

Division by zero #34

Open
Open
@xandrefreire

Description

@xandrefreire

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions