aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLittleboy2014-06-11 21:17:06 -0400
committerLittleboy2014-06-16 18:46:25 -0400
commit771cae50e4e1960fd76311fbb79971b999ec0332 (patch)
tree7d49d292e0b5c96079a8abe79da2a453f07786b1
parent5aad09213ba5392d5065a04f1547e359e39457a8 (diff)
downloadscummvm-rg350-771cae50e4e1960fd76311fbb79971b999ec0332.tar.gz
scummvm-rg350-771cae50e4e1960fd76311fbb79971b999ec0332.tar.bz2
scummvm-rg350-771cae50e4e1960fd76311fbb79971b999ec0332.zip
LASTEXPRESS: Check that the archive is loaded correctly in debug code. CID 1003848, 1003849
-rw-r--r--engines/lastexpress/debug.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index 57943f9a8d..a6cecc7408 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -653,7 +653,6 @@ bool Debugger::cmdPlayNis(int argc, const char **argv) {
// Make sure we are not called in a loop
_numParams = 0;
-
// Check if we got a nis filename or an animation index
if (name.contains('.')) {
Animation animation;
@@ -796,7 +795,10 @@ bool Debugger::cmdFight(int argc, const char **argv) {
break;
}
- loadArchive(index);
+ if (!loadArchive(index)) {
+ debugPrintf("Error: failed to load archive %d\n", index);
+ return true;
+ }
// Store command
if (!hasCommand()) {
@@ -854,7 +856,10 @@ error:
bool Debugger::cmdBeetle(int argc, const char **argv) {
if (argc == 1) {
// Load proper data file (beetle game in in Cd2)
- loadArchive(kArchiveCd2);
+ if (!loadArchive(kArchiveCd2)) {
+ debugPrintf("Error: failed to load archive 2");
+ return true;
+ }
// Store command
if (!hasCommand()) {
@@ -924,7 +929,6 @@ bool Debugger::cmdBeetle(int argc, const char **argv) {
break;
}
-
case Common::EVENT_LBUTTONUP:
case Common::EVENT_RBUTTONUP:
// Update coordinates