- Fixed: When processing the SFLG and SVCT chunks in ACS objects, the script number must be

read as a signed integer.

SVN r3402 (trunk)
This commit is contained in:
Randy Heit 2012-03-04 03:18:06 +00:00
parent 64fb6410cf
commit f2f9bd800d

View file

@ -1400,6 +1400,7 @@ void FBehavior::LoadScriptsDirectory ()
BYTE *b; BYTE *b;
DWORD *dw; DWORD *dw;
WORD *w; WORD *w;
SWORD *sw;
ScriptPtr2 *po; // Old ScriptPtr2 *po; // Old
ScriptPtr1 *pi; // Intermediate ScriptPtr1 *pi; // Intermediate
ScriptPtr3 *pe; // LittleEnhanced ScriptPtr3 *pe; // LittleEnhanced
@ -1522,7 +1523,7 @@ void FBehavior::LoadScriptsDirectory ()
scripts.dw += 2; scripts.dw += 2;
for (i = max; i > 0; --i, scripts.w += 2) for (i = max; i > 0; --i, scripts.w += 2)
{ {
ScriptPtr *ptr = const_cast<ScriptPtr *>(FindScript (LittleShort(scripts.w[0]))); ScriptPtr *ptr = const_cast<ScriptPtr *>(FindScript (LittleShort(scripts.sw[0])));
if (ptr != NULL) if (ptr != NULL)
{ {
ptr->Flags = LittleShort(scripts.w[1]); ptr->Flags = LittleShort(scripts.w[1]);
@ -1538,7 +1539,7 @@ void FBehavior::LoadScriptsDirectory ()
scripts.dw += 2; scripts.dw += 2;
for (i = max; i > 0; --i, scripts.w += 2) for (i = max; i > 0; --i, scripts.w += 2)
{ {
ScriptPtr *ptr = const_cast<ScriptPtr *>(FindScript (LittleShort(scripts.w[0]))); ScriptPtr *ptr = const_cast<ScriptPtr *>(FindScript (LittleShort(scripts.sw[0])));
if (ptr != NULL) if (ptr != NULL)
{ {
ptr->VarCount = LittleShort(scripts.w[1]); ptr->VarCount = LittleShort(scripts.w[1]);