Skip to content

Commit

Permalink
Fix encoding of pointers of 32bit apps.
Browse files Browse the repository at this point in the history
Fixes #1153
  • Loading branch information
pmuetschard committed Aug 11, 2022
1 parent 9068f99 commit b4c0390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gapil/encoder/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ func (e *encoder) encodeValue(buf buffer, val value, ty semantic.Type) {
e.encodeValue(buf, val, ty.NumberType)
return
case *semantic.Pointer:
e.Line("write_zig_zag(%P, reinterpret_cast<intptr_t>(%s));", buf, val)
e.Line("write_zig_zag(%P, reinterpret_cast<uintptr_t>(%s));", buf, val)
return
case *semantic.StaticArray:
panic("Must be handled in encodeField")
Expand Down

0 comments on commit b4c0390

Please sign in to comment.