[Scummvm-cvs-logs] scummvm master -> e38d4f20e8251937fd582e1ebb17568144a41e92

wjp wjp at usecode.org
Sat Oct 6 13:09:40 CEST 2012


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
5f3f21e20e SCI: Fix some console output formatting
e38d4f20e8 SCI: Fix dissect_script crash with invalid object types


Commit: 5f3f21e20ed86f4056544dbb5c3fcd471e20b377
    https://github.com/scummvm/scummvm/commit/5f3f21e20ed86f4056544dbb5c3fcd471e20b377
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2012-10-06T04:07:12-07:00

Commit Message:
SCI: Fix some console output formatting

Changed paths:
    engines/sci/console.cpp
    engines/sci/engine/scriptdebug.cpp



diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 1889d53..5ae8245 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -2882,17 +2882,17 @@ bool Console::cmdDisassemble(int argc, const char **argv) {
 	reg_t addr = NULL_REG;
 
 	if (!obj) {
-		DebugPrintf("Not an object.");
+		DebugPrintf("Not an object.\n");
 		return true;
 	}
 
 	if (selectorId < 0) {
-		DebugPrintf("Not a valid selector name.");
+		DebugPrintf("Not a valid selector name.\n");
 		return true;
 	}
 
 	if (lookupSelector(_engine->_gamestate->_segMan, objAddr, selectorId, NULL, &addr) != kSelectorMethod) {
-		DebugPrintf("Not a method.");
+		DebugPrintf("Not a method.\n");
 		return true;
 	}
 
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index d3abb9f..5594c04 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -514,7 +514,7 @@ void Kernel::dissectScript(int scriptNumber, Vocabulary *vocab) {
 
 		if (!objType) {
 			debugN("End of script object (#0) encountered.\n");
-			debugN("Classes: %i, Objects: %i, Export: %i,\n Var: %i (all base 10)",
+			debugN("Classes: %i, Objects: %i, Export: %i,\n Var: %i (all base 10)\n",
 			          objectctr[6], objectctr[1], objectctr[7], objectctr[10]);
 			return;
 		}


Commit: e38d4f20e8251937fd582e1ebb17568144a41e92
    https://github.com/scummvm/scummvm/commit/e38d4f20e8251937fd582e1ebb17568144a41e92
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2012-10-06T04:07:12-07:00

Commit Message:
SCI: Fix dissect_script crash with invalid object types

Changed paths:
    engines/sci/engine/scriptdebug.cpp



diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 5594c04..b2f22aa 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -527,7 +527,8 @@ void Kernel::dissectScript(int scriptNumber, Vocabulary *vocab) {
 
 		_seeker += objsize;
 
-		objectctr[objType]++;
+		if (objType >= 0 && objType < ARRAYSIZE(objectctr))
+			objectctr[objType]++;
 
 		switch (objType) {
 		case SCI_OBJ_OBJECT:






More information about the Scummvm-git-logs mailing list