go-wca icon indicating copy to clipboard operation
go-wca copied to clipboard

Use uint64 for pointer return vars

Open ThiefMaster opened this issue 3 years ago • 1 comments

fixes #8

NOTE:

  • I only tested the mmdGetId fix, but since the code in the other places is pretty much the same I'd expect it to work there as well.
  • I tried building my test app with GOARCH=386 and it still worked, so I guess uint64 with 32-bit pointers isn't a problem.

ThiefMaster avatar Jan 31 '21 16:01 ThiefMaster

I confirm this works on Windows 64bit.

Maybe uintptr instead of uint64 should be more appropriate since it holds a pointer, regardless of the platform you are in:

uintptr is an integer type that is large enough to hold the bit pattern of any pointer.

https://golang.org/pkg/builtin/#uintptr

emarj avatar Apr 01 '21 16:04 emarj