mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-20 01:31:09 +00:00
All that code is kinda obfuscated, but the integer passing was plain wrong (if sizeof(int) != sizeof(intptr_t), esp. noticeable on Big Endian). data[i] is used by Callbacks.cpp, and for everything but floats it's passed directly as an argument (interpreted as either an integer or a pointer to idVec3 or whatever). So storing an int in there with `( *( int * )&data[ i ] ) = int(...)` only sets the first 4 bytes of that intptr_t, which is 8 bytes on 64bit machines. On Little Endian that just happens to work, on Big Endian it's the wrong 4 bytes. |
||
---|---|---|
.. | ||
Script_Compiler.cpp | ||
Script_Compiler.h | ||
Script_Interpreter.cpp | ||
Script_Interpreter.h | ||
Script_Program.cpp | ||
Script_Program.h | ||
Script_Thread.cpp | ||
Script_Thread.h |