- 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
1 changed files with 3 additions and 2 deletions

View File

@ -1400,6 +1400,7 @@ void FBehavior::LoadScriptsDirectory ()
BYTE *b;
DWORD *dw;
WORD *w;
SWORD *sw;
ScriptPtr2 *po; // Old
ScriptPtr1 *pi; // Intermediate
ScriptPtr3 *pe; // LittleEnhanced
@ -1522,7 +1523,7 @@ void FBehavior::LoadScriptsDirectory ()
scripts.dw += 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)
{
ptr->Flags = LittleShort(scripts.w[1]);
@ -1538,7 +1539,7 @@ void FBehavior::LoadScriptsDirectory ()
scripts.dw += 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)
{
ptr->VarCount = LittleShort(scripts.w[1]);