jrouwe / JoltPhysics

A multi core friendly rigid body physics and collision detection library. Written in C++. Suitable for games and VR applications. Used by Horizon Forbidden West.
MIT License
6.41k stars 414 forks source link

Serialized arrays are not compatible between 32 and 64 bit systems #1177

Closed attilaz closed 1 month ago

attilaz commented 1 month ago

https://github.com/jrouwe/JoltPhysics/blob/master/Jolt/Core/StreamIn.h#L38 https://github.com/jrouwe/JoltPhysics/blob/master/Jolt/Core/StreamIn.h#L63 https://github.com/jrouwe/JoltPhysics/blob/master/Jolt/Core/StreamIn.h#L78

These size_type bytes sizes are different on 32 and 64 bit systems. So a serialized object saved with 64 bits cannot be properly loaded on a 32bit system.

jrouwe commented 1 month ago

Thanks for the report. I'll fix this. Note that this will take a while since I'm on holiday.