mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
Fix Torque3D 64bit DSOs.
Fix from Torque2D for 64bit string table entries.
This commit is contained in:
parent
80c7dfcb6c
commit
d8e302efee
1 changed files with 6 additions and 0 deletions
|
|
@ -409,6 +409,8 @@ bool CodeBlock::read(StringTableEntry fileName, Stream &st)
|
||||||
U32 totSize = codeLength + lineBreakPairCount * 2;
|
U32 totSize = codeLength + lineBreakPairCount * 2;
|
||||||
code = new U32[totSize];
|
code = new U32[totSize];
|
||||||
|
|
||||||
|
// 0xFF is used as a flag to help compress the bytecode.
|
||||||
|
// If detected, the bytecode is only a U8.
|
||||||
for (i = 0; i < codeLength; i++)
|
for (i = 0; i < codeLength; i++)
|
||||||
{
|
{
|
||||||
U8 b;
|
U8 b;
|
||||||
|
|
@ -442,7 +444,11 @@ bool CodeBlock::read(StringTableEntry fileName, Stream &st)
|
||||||
{
|
{
|
||||||
U32 ip;
|
U32 ip;
|
||||||
st.read(&ip);
|
st.read(&ip);
|
||||||
|
#ifdef TORQUE_CPU_X64
|
||||||
|
*(U64*)(code + ip) = (U64)ste;
|
||||||
|
#else
|
||||||
code[ip] = *((U32 *)&ste);
|
code[ip] = *((U32 *)&ste);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue