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.77k stars 452 forks source link

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

Closed attilaz closed 3 months ago

attilaz commented 4 months 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 4 months ago

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