aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2004-03-15 03:36:18 +0000
committerMax Horn2004-03-15 03:36:18 +0000
commitaf96fecb5da9b8da5e842ca8e1102a2f22f41d30 (patch)
treedd44b5941d1d3cc2d193a80081e207d69b867555
parente2617f90a19f81861c09f4bd68da00d0e037a4eb (diff)
downloadscummvm-rg350-af96fecb5da9b8da5e842ca8e1102a2f22f41d30.tar.gz
scummvm-rg350-af96fecb5da9b8da5e842ca8e1102a2f22f41d30.tar.bz2
scummvm-rg350-af96fecb5da9b8da5e842ca8e1102a2f22f41d30.zip
turn illegal SCUMM var access into an error
svn-id: r13302
-rw-r--r--scumm/scumm.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/scumm/scumm.h b/scumm/scumm.h
index ca9cee49d2..3f77f509b9 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -402,19 +402,14 @@ public:
int32& scummVar(byte var, const char *varName, const char *file, int line)
{
if (var == 0xFF) {
- warning("Illegal access to variable %s in file %s, line %d", varName, file, line);
- // Return a fake memory location, so that at least no innocent variable
- // gets overwritten.
- static int32 fake;
- fake = 0;
- return fake;
+ error("Illegal access to variable %s in file %s, line %d", varName, file, line);
}
return _scummVars[var];
}
int32 scummVar(byte var, const char *varName, const char *file, int line) const
{
if (var == 0xFF) {
- warning("Illegal access to variable %s in file %s, line %d", varName, file, line);
+ error("Illegal access to variable %s in file %s, line %d", varName, file, line);
}
return _scummVars[var];
}