[Scummvm-cvs-logs] CVS: scummvm/common debugger.cpp,1.11,1.12

Max Horn fingolfin at users.sourceforge.net
Sat Sep 4 12:29:02 CEST 2004


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4436

Modified Files:
	debugger.cpp 
Log Message:
Some type corrections

Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/debugger.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- debugger.cpp	4 Sep 2004 14:53:14 -0000	1.11
+++ debugger.cpp	4 Sep 2004 19:28:30 -0000	1.12
@@ -191,8 +191,8 @@
 					DebugPrintf("byte%s = %d\n", param[0], *(byte *)_dvars[i].variable);
 					break;
 				case DVAR_INT:
-					*(int *)_dvars[i].variable = atoi(param[1]);
-					DebugPrintf("(int)%s = %d\n", param[0], *(int *)_dvars[i].variable);
+					*(int32 *)_dvars[i].variable = atoi(param[1]);
+					DebugPrintf("(int)%s = %d\n", param[0], *(int32 *)_dvars[i].variable);
 					break;
 				// Integer Array
 				case DVAR_INTARRAY: {
@@ -220,19 +220,19 @@
 				switch(_dvars[i].type) {
 				// Integer
 				case DVAR_BYTE:
-					DebugPrintf("(byte)%s = %d\n", param[0], *(byte *)_dvars[i].variable);
+					DebugPrintf("(byte)%s = %d\n", param[0], *(const byte *)_dvars[i].variable);
 					break;
 				case DVAR_INT:
-					DebugPrintf("(int)%s = %d\n", param[0], *(int *)_dvars[i].variable);
+					DebugPrintf("(int)%s = %d\n", param[0], *(const int32 *)_dvars[i].variable);
 					break;
 				// Integer array
 				case DVAR_INTARRAY: {
-					char *chr = (char *)strchr(param[0], '[');
+					const char *chr = strchr(param[0], '[');
 					if (!chr) {
 						DebugPrintf("You must access this array as %s[element]\n", param[0]);
 					} else {
 						int element = atoi(chr+1);
-						int32 *var = *(int32 **)_dvars[i].variable;
+						const int32 *var = *(const int32 **)_dvars[i].variable;
 						if (element >= _dvars[i].optional) {
 							DebugPrintf("%s is out of range (array is %d elements big)\n", param[0], _dvars[i].optional);
 						} else {





More information about the Scummvm-git-logs mailing list