ThibaultLemaire/HomeworldSDL

SpaceObjRegistry ids used as pointers

Opened this issue · 0 comments

I stumbled upon the SpaceObjRegistryGetID function in SavedGame.c because every time it's used, its return is cast to a pointer.

Now I'm not sure I grasp how that even worked in 32b (It's returning an index in an array, how can you cast that to pointer?), but I know it returns an sdword (signed int 32) which cannot be cast to a 64b pointer.