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

conversion error in Memory.Fn.ThiscallU8 #97

Closed
x87 opened this issue Aug 1, 2023 · 2 comments
Closed

conversion error in Memory.Fn.ThiscallU8 #97

x87 opened this issue Aug 1, 2023 · 2 comments
Labels
type:bug Something isn't working

Comments

@x87
Copy link
Contributor

x87 commented Aug 1, 2023

Memory.Fn.ThiscallU8 fails with

Error converting from js 'i32' into type 'i8': Overflow
@x87 x87 added the type:bug Something isn't working label Aug 1, 2023
@x87
Copy link
Contributor Author

x87 commented Aug 1, 2023

workaround: use ThiscallI32 and convert a 32-bit value to a 8-bit using & 255

let res = Memory.Fn.ThiscallI32(addr, struct)(arg1, arg2);
return res & 255

@x87
Copy link
Contributor Author

x87 commented Aug 13, 2023

Fixed in 1.2.1

@x87 x87 closed this as completed Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant