aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2011-11-02 22:20:27 +0000
committerEugene Sandulenko2011-11-02 22:20:27 +0000
commitf6a9c6727dc11639a11e17fdcf3d0c0a39b8be96 (patch)
treef8e0866b3ba44eff0aeb3efdd714671f0b308f3d /engines
parent022857a3711cef9b3ae60a88c436c212792918f0 (diff)
downloadscummvm-rg350-f6a9c6727dc11639a11e17fdcf3d0c0a39b8be96.tar.gz
scummvm-rg350-f6a9c6727dc11639a11e17fdcf3d0c0a39b8be96.tar.bz2
scummvm-rg350-f6a9c6727dc11639a11e17fdcf3d0c0a39b8be96.zip
AGI: Fix buffer overflow
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/opcodes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/agi/opcodes.cpp b/engines/agi/opcodes.cpp
index d1baab93e1..29fb860635 100644
--- a/engines/agi/opcodes.cpp
+++ b/engines/agi/opcodes.cpp
@@ -360,7 +360,7 @@ AgiInstruction insV2[] = {
void AgiEngine::setupOpcodes() {
if (getVersion() >= 0x2000) {
- for (int i = 0; i <= ARRAYSIZE(insV2Test); ++i)
+ for (int i = 0; i < ARRAYSIZE(insV2Test); ++i)
_agiCondCommands[i] = insV2Test[i].func;
for (int i = 0; i < ARRAYSIZE(insV2); ++i)
_agiCommands[i] = insV2[i].func;
@@ -368,7 +368,7 @@ void AgiEngine::setupOpcodes() {
logicNamesTest = insV2Test;
logicNamesCmd = insV2;
} else {
- for (int i = 0; i <= ARRAYSIZE(insV1Test); ++i)
+ for (int i = 0; i < ARRAYSIZE(insV1Test); ++i)
_agiCondCommands[i] = insV1Test[i].func;
for (int i = 0; i < ARRAYSIZE(insV1); ++i)
_agiCommands[i] = insV1[i].func;