TOLTECS: Fix script bug #3599964 - "TOLTECS: Crash when entering cave"
This commit is contained in:
parent
a7b72d0a9a
commit
796867cd32
1 changed files with 4 additions and 1 deletions
|
@ -252,9 +252,12 @@ void ScriptInterpreter::execOpcode(byte opcode) {
|
|||
// ok
|
||||
_subCode = _code;
|
||||
byte length = readByte();
|
||||
if (length == 0) {
|
||||
warning("Possible script bug detected - opcode length is 0 when calling script function");
|
||||
return;
|
||||
}
|
||||
debug(2, "length = %d", length);
|
||||
uint16 index = readInt16();
|
||||
debug(2, "callScriptFunction %d", index);
|
||||
execScriptFunction(index);
|
||||
_code += length - 2;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue