aboutsummaryrefslogtreecommitdiff
path: root/engines/toltecs
diff options
context:
space:
mode:
authorFilippos Karapetis2013-04-26 18:15:08 +0300
committerFilippos Karapetis2013-04-26 18:21:23 +0300
commit14f152997625320f0cd5cc9b92a2b1e9e6d2df00 (patch)
tree05593fa9a6dc6d48395462808d2048b17771cf39 /engines/toltecs
parentdfea40cc11824935a7c25f4b8d49c0ba2afba727 (diff)
downloadscummvm-rg350-14f152997625320f0cd5cc9b92a2b1e9e6d2df00.tar.gz
scummvm-rg350-14f152997625320f0cd5cc9b92a2b1e9e6d2df00.tar.bz2
scummvm-rg350-14f152997625320f0cd5cc9b92a2b1e9e6d2df00.zip
TOLTECS: Ignore invalid script opcodes (script bugs) - bug #3604025
The original ignores invalid opcodes as well, according to johndoe
Diffstat (limited to 'engines/toltecs')
-rw-r--r--engines/toltecs/script.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/toltecs/script.cpp b/engines/toltecs/script.cpp
index 07d74ac369..476c3a4fcf 100644
--- a/engines/toltecs/script.cpp
+++ b/engines/toltecs/script.cpp
@@ -265,7 +265,7 @@ void ScriptInterpreter::execOpcode(byte opcode) {
_subCode = _code;
byte length = readByte();
if (length == 0) {
- warning("Possible script bug detected - opcode length is 0 when calling script function");
+ warning("Opcode length is 0 when calling script function");
return;
}
debug(2, "length = %d", length);
@@ -484,7 +484,9 @@ void ScriptInterpreter::execOpcode(byte opcode) {
_code++;
break;
default:
- error("Invalid opcode %d", opcode);
+ // Most likely a script bug. Throw a warning and ignore it.
+ // The original ignores invalid opcodes as well - bug #3604025.
+ warning("Invalid opcode %d", opcode);
}
}