aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-12-30 23:05:34 +0000
committerMax Horn2003-12-30 23:05:34 +0000
commitc06b1af619dbdf8e6ead166b3059447d82c5438d (patch)
tree0bbb547fdc1d31058016174dab163895038e6b29
parent436834750d220b2bbd1f5f42c43126d699774140 (diff)
downloadscummvm-rg350-c06b1af619dbdf8e6ead166b3059447d82c5438d.tar.gz
scummvm-rg350-c06b1af619dbdf8e6ead166b3059447d82c5438d.tar.bz2
scummvm-rg350-c06b1af619dbdf8e6ead166b3059447d82c5438d.zip
be a bit more gentle to people typing in invalid box IDs :-)
svn-id: r12044
-rw-r--r--scumm/debugger.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp
index 7bf6395cf0..db6df7650f 100644
--- a/scumm/debugger.cpp
+++ b/scumm/debugger.cpp
@@ -582,7 +582,10 @@ bool ScummDebugger::Cmd_PrintBoxMatrix(int argc, const char **argv) {
}
void ScummDebugger::printBox(int box) {
- assert(box < _vm->getNumBoxes());
+ if (box < 0 || box >= _vm->getNumBoxes()) {
+ DebugPrintf("%d is not a valid box!\n", box);
+ return;
+ }
BoxCoords coords;
int flags = _vm->getBoxFlags(box);
int mask = _vm->getMaskFromBox(box);