cleolibrary / CLEO-Redux

Experimental JavaScript runtime for GTA 3D era games/GTA IV/Bully
https://re.cleo.li
Other
213 stars 20 forks source link

conversion error in Memory.Fn.ThiscallU8 #97

Closed x87 closed 1 year ago

x87 commented 1 year ago

Memory.Fn.ThiscallU8 fails with

Error converting from js 'i32' into type 'i8': Overflow
x87 commented 1 year ago

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 commented 1 year ago

Fixed in 1.2.1