diff options
-rw-r--r-- | scumm/saveload.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v8.cpp | 4 | ||||
-rw-r--r-- | scumm/scumm.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 95c8c457ea..67230f64b7 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -361,7 +361,7 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) // 16 to 32 bit variables... and THEN from 16 to 20 variables MKARRAY_OLD(Scumm, vm.localvar[0][0], sleUint16, 25 * 17, VER_V8, VER_V8), MKARRAY_OLD(Scumm, vm.localvar[0][0], sleUint16, NUM_SCRIPT_SLOT * 17, VER_V9, VER_V14), - MKARRAY(Scumm, vm.localvar[0][0], sleUint16, NUM_SCRIPT_SLOT * 20, VER_V15), + MKARRAY(Scumm, vm.localvar[0][0], sleUint16, NUM_SCRIPT_SLOT * 25, VER_V15), MKARRAY(Scumm, _resourceMapper[0], sleByte, 128, VER_V8), MKARRAY(Scumm, _charsetColorMap[0], sleByte, 16, VER_V8), diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index cf6822cd86..6582948a21 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -410,7 +410,7 @@ int Scumm_v8::readVar(uint var) if (var & 0x40000000) { var &= 0xFFFFFFF; - checkRange(0x10, 0, var, "Local variable %d out of range(r)"); + checkRange(25, 0, var, "Local variable %d out of range(r)"); return vm.localvar[_currentScript][var]; } @@ -449,7 +449,7 @@ void Scumm_v8::writeVar(uint var, int value) if (var & 0x40000000) { var &= 0xFFFFFFF; - checkRange(0x10, 0, var, "Local variable %d out of range(w)"); + checkRange(25, 0, var, "Local variable %d out of range(w)"); vm.localvar[_currentScript][var] = value; return; } diff --git a/scumm/scumm.h b/scumm/scumm.h index 8780fe53e3..bbd7dff6c4 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -254,7 +254,7 @@ public: byte cutSceneStackPointer; ScriptSlot slot[NUM_SCRIPT_SLOT]; NestedScript nest[15]; - int32 localvar[NUM_SCRIPT_SLOT][21]; + int32 localvar[NUM_SCRIPT_SLOT][26]; } vm; struct { |