[Scummvm-cvs-logs] CVS: scummvm/saga game.cpp,1.4,1.5

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Tue Apr 27 01:55:02 CEST 2004


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

Modified Files:
	game.cpp 
Log Message:
Don't use uninitialized variable, lang_path, in debugging messages. It
caused ScummVM to hang on my Linux box.

Fixed - correctly, I hope - compiler warning.


Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/game.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- game.cpp	25 Apr 2004 15:14:46 -0000	1.4
+++ game.cpp	27 Apr 2004 08:54:03 -0000	1.5
@@ -206,7 +206,7 @@
 	{R_GAME_FONT_LARGE3, 8}
 };
 
-R_GAME_RESOURCEDESC IHNM_Resources[] = {
+R_GAME_RESOURCEDESC IHNM_Resources = {
 	IHNM_SCENE_LUT,		/* Scene lookup table RN */
 	IHNM_SCRIPT_LUT,	/* Script lookup table RN */
 
@@ -308,7 +308,7 @@
 
 		    0,
 
-		    IHNM_Resources,
+		    &IHNM_Resources,
 
 		    ARRAYSIZE(IHNMDEMO_GameFiles),
 		    IHNMDEMO_GameFiles,
@@ -333,7 +333,7 @@
 
 		    1,
 
-		    IHNM_Resources,
+		    &IHNM_Resources,
 
 		    ARRAYSIZE(IHNMCD_GameFiles),
 		    IHNMCD_GameFiles,
@@ -444,7 +444,7 @@
 {
 
 	char lang_file[R_MAXPATH];
-	char lang_path[R_MAXPATH];
+	// char lang_path[R_MAXPATH];
 	uint game_n;
 
 	File test_file;
@@ -461,7 +461,7 @@
 		if (!test_file.open(lang_file)) {
 			R_printf(R_STDOUT,
 			    "Couldn't open language file %s. "
-			    "Using default (US English)\n", lang_path);
+			    "Using default (US English)\n", lang_file);
 
 			return R_SUCCESS;
 		}
@@ -483,7 +483,7 @@
 			return R_FAILURE;
 		}
 
-		R_printf(R_STDOUT, "Using language file %s.\n", lang_path);
+		R_printf(R_STDOUT, "Using language file %s.\n", lang_file);
 
 		// FIXME
 		//CFG_Read(lang_path);





More information about the Scummvm-git-logs mailing list