[Scummvm-cvs-logs] scummvm master -> 796867cd32408aada11fc21323d5ee0ce201ffee

bluegr bluegr at gmail.com
Tue Jan 8 22:14:31 CET 2013


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:
796867cd32 TOLTECS: Fix script bug #3599964 - "TOLTECS: Crash when entering cave"


Commit: 796867cd32408aada11fc21323d5ee0ce201ffee
    https://github.com/scummvm/scummvm/commit/796867cd32408aada11fc21323d5ee0ce201ffee
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-01-08T13:13:38-08:00

Commit Message:
TOLTECS: Fix script bug #3599964 - "TOLTECS: Crash when entering cave"

Changed paths:
    engines/toltecs/script.cpp



diff --git a/engines/toltecs/script.cpp b/engines/toltecs/script.cpp
index f5e3f84..9ea95a2 100644
--- a/engines/toltecs/script.cpp
+++ b/engines/toltecs/script.cpp
@@ -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;






More information about the Scummvm-git-logs mailing list