diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 4e2b55fd0d..c62b7d880b 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -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(FindScript (LittleShort(scripts.w[0]))); + ScriptPtr *ptr = const_cast(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(FindScript (LittleShort(scripts.w[0]))); + ScriptPtr *ptr = const_cast(FindScript (LittleShort(scripts.sw[0]))); if (ptr != NULL) { ptr->VarCount = LittleShort(scripts.w[1]);