You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is my understanding that the I32 type is sign agnostic, meaning it should be able to handle both int32 and uint32 types. However this is not how wasmer appears to handle it. See this code snippet:
`case I32:
output.kind = kind.inner()
var of = (*int32)(unsafe.Pointer(&output.of))
switch value.(type) {
case int8:
*of = int32(value.(int8))
case uint8:
*of = int32(value.(uint8))
case int16:
*of = int32(value.(int16))
case uint16:
*of = int32(value.(uint16))
case int32:
*of = value.(int32)
case int:
*of = int32(value.(int))
case uint:
*of = int32(value.(uint))
default:
return output, newErrorWith("i32")
}`
I need to pass in uint32 values, and I had expected that they should be encompased in the I32 type, but my code panics. Am I misunderstanding something here or is this a bug?
Any help/guidance would be appreciated, thanks!
Additional details
Provide any additional details here.
The text was updated successfully, but these errors were encountered:
Summary
It is my understanding that the I32 type is sign agnostic, meaning it should be able to handle both int32 and uint32 types. However this is not how wasmer appears to handle it. See this code snippet:
`case I32:
from
wasmer-go/wasmer/value.go
Line 207 in ca60a45
I need to pass in uint32 values, and I had expected that they should be encompased in the I32 type, but my code panics. Am I misunderstanding something here or is this a bug?
Any help/guidance would be appreciated, thanks!
Additional details
Provide any additional details here.
The text was updated successfully, but these errors were encountered: