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

Integer conversion raising en exception #62

Open
ljulliar opened this issue Jun 1, 2022 · 0 comments
Open

Integer conversion raising en exception #62

ljulliar opened this issue Jun 1, 2022 · 0 comments
Labels
❓ question Further information is requested

Comments

@ljulliar
Copy link

ljulliar commented Jun 1, 2022

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.

@ljulliar ljulliar added the ❓ question Further information is requested label Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant