aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/script_v6.cpp')
-rw-r--r--scumm/script_v6.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 220899cae7..1519a2b71a 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -3018,7 +3018,7 @@ void ScummEngine_v6::o6_pickVarRandom() {
num = readArray(value, 0, 0);
- byte *ptr = getResourceAddress(rtString, num);
+ byte *ptr = getResourceAddress(rtString, readVar(value));
if (_version >= 7 || _heversion >= 72) {
var_A = READ_LE_UINT32(ptr + 4);
var_C = READ_LE_UINT32(ptr + 8);