[Scummvm-git-logs] scummvm master -> f73584f0e5b43f24db4b66cdd07acc7f5c9f617b
bluegr
bluegr at gmail.com
Mon Mar 18 06:44:27 CET 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f73584f0e5 SCI: Fix disassembler crash on invalid property
Commit: f73584f0e5b43f24db4b66cdd07acc7f5c9f617b
https://github.com/scummvm/scummvm/commit/f73584f0e5b43f24db4b66cdd07acc7f5c9f617b
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-03-18T07:44:23+02:00
Commit Message:
SCI: Fix disassembler crash on invalid property
Fixes debugger crash when disassembling an instruction whose operand
is an invalid property. This occurs in LB2 floppy 1.0 script 720 in
sGetUp:changeState and sStepOnNail:changeState.
Changed paths:
engines/sci/engine/scriptdebug.cpp
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index f5c1f8d..2bb58d4 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -218,7 +218,11 @@ reg_t disassemble(EngineState *s, reg_t pos, const Object *obj, bool printBWTag,
if (obj != nullptr) {
const Object *const super = obj->getClass(s->_segMan);
assert(super);
- selectorName = kernel->getSelectorName(super->getVarSelector(param_value / 2)).c_str();
+ if (param_value / 2 < super->getVarCount()) {
+ selectorName = kernel->getSelectorName(super->getVarSelector(param_value / 2)).c_str();
+ } else {
+ selectorName = "<invalid>";
+ }
} else {
selectorName = "<unavailable>";
}
More information about the Scummvm-git-logs
mailing list