aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2016-10-14 13:20:04 -0500
committerColin Snover2016-10-14 19:43:47 -0500
commitc3adfc065ea925fc6f7e0dccd8352f3d2c64e98a (patch)
treeb49d130ceddd4570de923464facf72f43779f08c /engines
parenta05ae2e24ae6dcbeb29c95e045141c9500c4d589 (diff)
downloadscummvm-rg350-c3adfc065ea925fc6f7e0dccd8352f3d2c64e98a.tar.gz
scummvm-rg350-c3adfc065ea925fc6f7e0dccd8352f3d2c64e98a.tar.bz2
scummvm-rg350-c3adfc065ea925fc6f7e0dccd8352f3d2c64e98a.zip
SCI: Ensure export breakpoints always trigger on export calls
Previously, export calls to non-existing functions would act like there was never an export call, and the breakpoint would never be triggered.
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/vm.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 82de957387..700b7d2a21 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -235,13 +235,13 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP
scr = s->_segMan->getScript(seg);
}
+ // Check if a breakpoint is set on this method
+ g_sci->checkExportBreakpoint(script, pubfunct);
+
uint32 exportAddr = scr->validateExportFunc(pubfunct, false);
if (!exportAddr)
return NULL;
- // Check if a breakpoint is set on this method
- g_sci->checkExportBreakpoint(script, pubfunct);
-
assert(argp[0].toUint16() == argc); // The first argument is argc
ExecStack xstack(calling_obj, calling_obj, sp, argc, argp,
seg, make_reg32(seg, exportAddr), -1, -1, -1, pubfunct, -1,