aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-01-16 06:16:38 +0000
committerTravis Howell2004-01-16 06:16:38 +0000
commit2c7057fdf418ad894bdafa1c2e7607878b83c03f (patch)
tree5ac7449ed9b9fceb2f7f542fee6cf248b6c75e62
parentbafbdc57e6497a4bbc856d106a2e81b23741b6e8 (diff)
downloadscummvm-rg350-2c7057fdf418ad894bdafa1c2e7607878b83c03f.tar.gz
scummvm-rg350-2c7057fdf418ad894bdafa1c2e7607878b83c03f.tar.bz2
scummvm-rg350-2c7057fdf418ad894bdafa1c2e7607878b83c03f.zip
Checks were a bit too strict, makes fatty bear completable.
svn-id: r12421
-rw-r--r--scumm/akos.cpp2
-rw-r--r--scumm/script_v6.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp
index d3af4ee874..be9aeec068 100644
--- a/scumm/akos.cpp
+++ b/scumm/akos.cpp
@@ -1252,7 +1252,7 @@ bool ScummEngine::akos_increaseAnim(Actor *a, int chan, const byte *aksq, const
if (akfo == NULL)
error("akos_increaseAnim: no AKFO table");
tmp = a->getAnimVar(GB(2)) - 1;
- if (tmp < 0 || tmp >= numakfo - 1)
+ if (tmp < 0 || tmp > numakfo - 1)
error("akos_increaseAnim: invalid jump value %d", tmp);
curpos = READ_LE_UINT16(&akfo[tmp]);
break;
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 3ff70aedbf..a8ccf68e6e 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -411,7 +411,7 @@ int ScummEngine::readArray(int array, int idx, int base) {
// FIX THE FIXME: fixing an assert by commenting out is bad. It's evil.
// It's wrong. Find the proper cause, or at least, silently return
// from the function, but don't just go on overwriting memory!
- assert(base >= 0 && base < ah->dim1_size * ah->dim2_size);
+ assert(base >= 0 && base <= ah->dim1_size * ah->dim2_size);
if (ah->type == 4) {
return ah->data[base];
@@ -428,7 +428,7 @@ void ScummEngine::writeArray(int array, int idx, int base, int value) {
return;
base += idx * ah->dim1_size;
- assert(base >= 0 && base < ah->dim1_size * ah->dim2_size);
+ assert(base >= 0 && base <= ah->dim1_size * ah->dim2_size);
if (ah->type == 4) {
ah->data[base] = value;