aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2004-09-14 10:46:09 +0000
committerTravis Howell2004-09-14 10:46:09 +0000
commit5d25e4a197978938719bb50390e7a9f395e6d3dd (patch)
tree83c117bcf7a24c7c75a3133fb1edc41775debd28 /scumm
parent20a444099deb0fa2f108a712c1e138ddace766d2 (diff)
downloadscummvm-rg350-5d25e4a197978938719bb50390e7a9f395e6d3dd.tar.gz
scummvm-rg350-5d25e4a197978938719bb50390e7a9f395e6d3dd.tar.bz2
scummvm-rg350-5d25e4a197978938719bb50390e7a9f395e6d3dd.zip
Fix array issues.
svn-id: r15113
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v72he.cpp8
-rw-r--r--scumm/script_v7he.cpp8
2 files changed, 10 insertions, 6 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index a72b639c55..9cb40b2d18 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -1931,12 +1931,14 @@ void ScummEngine_v72he::o72_unknownF5() {
while (pos < len) {
chr = readArray(0, 0, pos);
result += getCharsetOffsets(chr);
- if (result >= max)
- break;
+ if (result >= max) {
+ push(pos);
+ return;
+ }
pos++;
}
- push(result);
+ push(len);
debug(1,"stub o72_unknownF5 (%d)", result);
}
diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp
index fc32b24a68..5cbc6fc342 100644
--- a/scumm/script_v7he.cpp
+++ b/scumm/script_v7he.cpp
@@ -968,12 +968,14 @@ void ScummEngine_v7he::o7_unknownF5() {
while (pos < len) {
chr = readArray(0, 0, pos);
result += getCharsetOffsets(chr);
- if (result >= max)
- break;
+ if (result >= max) {
+ push(pos);
+ return;
+ }
pos++;
}
- push(result);
+ push(len);
debug(1,"stub o7_unknownF5 (%d)", result);
}