diff options
Diffstat (limited to 'engines/scumm/script_v2.cpp')
-rw-r--r-- | engines/scumm/script_v2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp index aee06420c1..ace9a2fe8e 100644 --- a/engines/scumm/script_v2.cpp +++ b/engines/scumm/script_v2.cpp @@ -434,13 +434,13 @@ int ScummEngine_v2::readVar(uint var) { if (var >= 14 && var <= 16) var = _scummVars[var]; - checkRange(_numVariables - 1, 0, var, "Variable %d out of range(r)"); + assertRange(0, var, _numVariables - 1, "variable (reading)"); debugC(DEBUG_VARS, "readvar(%d) = %d", var, _scummVars[var]); return _scummVars[var]; } void ScummEngine_v2::writeVar(uint var, int value) { - checkRange(_numVariables - 1, 0, var, "Variable %d out of range(r)"); + assertRange(0, var, _numVariables - 1, "variable (writing)"); debugC(DEBUG_VARS, "writeVar(%d) = %d", var, value); if (VAR_CUTSCENEEXIT_KEY != 0xFF && var == VAR_CUTSCENEEXIT_KEY) { |