aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2004-11-28 22:26:03 +0000
committerMax Horn2004-11-28 22:26:03 +0000
commit61440ca8304efc2e375cc46bdc06f9028d785ce7 (patch)
tree66849ec0f7b0e052e24aac48918c146bee131a7b /scumm
parent1f56326bd53f2762b353449a534a0912250b5e17 (diff)
downloadscummvm-rg350-61440ca8304efc2e375cc46bdc06f9028d785ce7.tar.gz
scummvm-rg350-61440ca8304efc2e375cc46bdc06f9028d785ce7.tar.bz2
scummvm-rg350-61440ca8304efc2e375cc46bdc06f9028d785ce7.zip
Fix range check
svn-id: r15949
Diffstat (limited to 'scumm')
-rw-r--r--scumm/akos.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp
index 0f38148997..1aadc1fdec 100644
--- a/scumm/akos.cpp
+++ b/scumm/akos.cpp
@@ -1618,9 +1618,9 @@ bool ScummEngine::akos_increaseAnim(Actor *a, int chan, const byte *aksq, const
}
void ScummEngine::akos_queCommand(byte cmd, Actor *a, int param_1, int param_2) {
- checkRange(32, 0, _akosQueuePos, "akos_queCommand overflow");
-
_akosQueuePos++;
+ checkRange(31, 0, _akosQueuePos, "akos_queCommand overflow");
+
_akosQueue[_akosQueuePos].cmd = cmd;
_akosQueue[_akosQueuePos].actor = a->number;
_akosQueue[_akosQueuePos].param1 = param_1;