aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWalter van Niftrik2017-02-17 23:17:18 +0100
committerWalter van Niftrik2017-02-18 11:46:12 +0100
commit9ed63332faca6eef549d7f9b7ed11f6d4c22af28 (patch)
tree0ac2409a6fabe0c039517da84540991a3a79552b /engines
parent086e89bf7d1d2305613711f23018cf933a45add6 (diff)
downloadscummvm-rg350-9ed63332faca6eef549d7f9b7ed11f6d4c22af28.tar.gz
scummvm-rg350-9ed63332faca6eef549d7f9b7ed11f6d4c22af28.tar.bz2
scummvm-rg350-9ed63332faca6eef549d7f9b7ed11f6d4c22af28.zip
ADL: Fix restoring of global vars in v4+
Diffstat (limited to 'engines')
-rw-r--r--engines/adl/adl_v4.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/adl/adl_v4.cpp b/engines/adl/adl_v4.cpp
index 8370bead6f..a5d2de264d 100644
--- a/engines/adl/adl_v4.cpp
+++ b/engines/adl/adl_v4.cpp
@@ -127,7 +127,7 @@ void AdlEngine_v4::loadState(Common::ReadStream &stream) {
if (size != expectedSize)
error("Variable count mismatch (expected %i; found %i)", expectedSize, size);
- for (uint i = getRegion(1).vars.size(); i < size; ++i)
+ for (uint i = getRegion(1).vars.size(); i < _state.vars.size(); ++i)
_state.vars[i] = stream.readByte();
if (stream.err() || stream.eos())