diff options
| author | James Brown | 2002-03-11 14:24:48 +0000 |
|---|---|---|
| committer | James Brown | 2002-03-11 14:24:48 +0000 |
| commit | 25846cf8e4e05d4f3724a5d5132db16a55f8869a (patch) | |
| tree | 9226a982606b4624147046908439d22aeb742627 | |
| parent | 93069e3e5a14467b8241838c1d6f0363d3872273 (diff) | |
| download | scummvm-rg350-25846cf8e4e05d4f3724a5d5132db16a55f8869a.tar.gz scummvm-rg350-25846cf8e4e05d4f3724a5d5132db16a55f8869a.tar.bz2 scummvm-rg350-25846cf8e4e05d4f3724a5d5132db16a55f8869a.zip | |
Quick Zak crash workarounds.
svn-id: r3731
| -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); |
