summaryrefslogtreecommitdiffstats
path: root/src/control/Script8.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-25 14:18:48 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-25 14:18:48 +0100
commite00b8a93bf7a53ef09bc349aefd3a2a37d58f09e (patch)
tree924da3fee9f1013e15de1ffa6a7f72e9537e46e1 /src/control/Script8.cpp
parentMerge pull request #895 from ShFil119/miami_audio (diff)
downloadre3-e00b8a93bf7a53ef09bc349aefd3a2a37d58f09e.tar
re3-e00b8a93bf7a53ef09bc349aefd3a2a37d58f09e.tar.gz
re3-e00b8a93bf7a53ef09bc349aefd3a2a37d58f09e.tar.bz2
re3-e00b8a93bf7a53ef09bc349aefd3a2a37d58f09e.tar.lz
re3-e00b8a93bf7a53ef09bc349aefd3a2a37d58f09e.tar.xz
re3-e00b8a93bf7a53ef09bc349aefd3a2a37d58f09e.tar.zst
re3-e00b8a93bf7a53ef09bc349aefd3a2a37d58f09e.zip
Diffstat (limited to 'src/control/Script8.cpp')
-rw-r--r--src/control/Script8.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/control/Script8.cpp b/src/control/Script8.cpp
index 08965e72..a75692a0 100644
--- a/src/control/Script8.cpp
+++ b/src/control/Script8.cpp
@@ -132,11 +132,12 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
CollectParameters(&m_nIp, 1);
CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]];
char key[KEY_LENGTH_IN_SCRIPT];
+ memset(key, 0, KEY_LENGTH_IN_SCRIPT);
CTheScripts::ReadTextLabelFromScript(&m_nIp, key);
m_nIp += KEY_LENGTH_IN_SCRIPT;
CVector pos = pPlayerInfo->GetPos();
CZone *infoZone = CTheZones::FindInformationZoneForPosition(&pos);
- UpdateCompareFlag(strncmp(key, infoZone->name, 8) == 0);
+ UpdateCompareFlag(strncmp(key, infoZone->name, 8) == 0); // original code doesn't seem to be using strncmp in here and compare 2 ints instead
return 0;
}
case COMMAND_CLEAR_CHAR_ICE_CREAM_PURCHASE: