diff options
-rw-r--r-- | script.cpp | 2 | ||||
-rw-r--r-- | script_v1.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/script.cpp b/script.cpp index 9d5a8b2ef8..c672eecd17 100644 --- a/script.cpp +++ b/script.cpp @@ -254,7 +254,7 @@ void Scumm::executeScript() { _opcode = fetchScriptByte(); _scriptPointerStart = _scriptPointer; vm.slot[_currentScript].didexec = 1; - //debug(1, "[%X] %s()", _opcode, _opcodes_lookup[_opcode]); + debug(1, "[%X] %s()", _opcode, _opcodes_lookup[_opcode]); op = getOpcode(_opcode); (this->*op)(); } diff --git a/script_v1.cpp b/script_v1.cpp index 9a8e26b268..ec4155f34c 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -696,7 +696,7 @@ void Scumm::o5_actorSet() { while ( (_opcode = fetchScriptByte()) != 0xFF) { if(_features & GF_SMALL_HEADER) _opcode = (_opcode&0xE0) | convertTable[(_opcode&0x1F)-1]; - +if (!a) return; switch(_opcode&0x1F) { case 0: /* dummy case */ getVarOrDirectByte(0x80); @@ -1581,6 +1581,7 @@ void Scumm::o5_putActor() { Actor *a; a = derefActorSafe(getVarOrDirectByte(0x80), "o5_putActor"); + if (!a) return; x = getVarOrDirectWord(0x40); y = getVarOrDirectWord(0x20); |