aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v72he.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/script_v72he.cpp')
-rw-r--r--scumm/script_v72he.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 00d20c2ff3..fc396fc58e 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -1699,7 +1699,7 @@ void ScummEngine_v72he::o72_pickVarRandom() {
int value = fetchScriptWord();
if (readVar(value) == 0) {
- defineArray(value, kDwordArray, 0, 0, 0, num + 1);
+ defineArray(value, kDwordArray, 0, 0, 0, num);
if (num > 0) {
int16 counter = 0;
do {
@@ -1707,7 +1707,7 @@ void ScummEngine_v72he::o72_pickVarRandom() {
} while (++counter < num);
}
- shuffleArray(value, 1, num-1);
+ shuffleArray(value, 1, num);
writeArray(value, 0, 0, 2);
push(readArray(value, 0, 1));
return;