Skip to content

Integer conversion raising en exception #62

Description

@ljulliar

When trying to call an exported WASM function from Ruby with a negative integer parameter an exception is raised.

The function call is:
@exports.i32_to_s.call(-1)
the parameter signature of the WASM func is i32

and the exception raised is
TypeError: out of range integral type conversion attempted

I have no trouble passing a positive value.
Is this the expected behavior ? How can I pass a negative value ? Do i Have to pass the 2-complement positive value (meaning 65535 here) ?

Thank you for your help.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ❓ questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions