[Scummvm-cvs-logs] SF.net SVN: scummvm:[42842] scummvm/trunk/engines

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Mon Jul 27 18:04:35 CEST 2009


Revision: 42842
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42842&view=rev
Author:   wjpalenstijn
Date:     2009-07-27 16:04:35 +0000 (Mon, 27 Jul 2009)

Log Message:
-----------
Fix format string issues (and compiler warnings).
Patch by salty-horse.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/gui.cpp
    scummvm/trunk/engines/scumm/resource.cpp

Modified: scummvm/trunk/engines/kyra/gui.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui.cpp	2009-07-27 05:34:22 UTC (rev 42841)
+++ scummvm/trunk/engines/kyra/gui.cpp	2009-07-27 16:04:35 UTC (rev 42842)
@@ -538,18 +538,18 @@
 			int item = (mouse.y - menuRect.top) / fh;
 
 			if (item != selected) {
-				printString(_static.strings[selected], textPos, menuRect.top + selected * fh, _static.menuTable[5], 0, 5);
-				printString(_static.strings[item], textPos, menuRect.top + item * fh, _static.menuTable[6], 0, 5);
+				printString("%s", textPos, menuRect.top + selected * fh, _static.menuTable[5], 0, 5, _static.strings[selected]);
+				printString("%s", textPos, menuRect.top + item * fh, _static.menuTable[6], 0, 5, _static.strings[item]);
 
 				selected = item;
 			}
 
 			if (mousePressed) {
 				for (int i = 0; i < 3; i++) {
-					printString(_static.strings[selected], textPos, menuRect.top + selected * fh, _static.menuTable[5], 0, 5);
+					printString("%s", textPos, menuRect.top + selected * fh, _static.menuTable[5], 0, 5, _static.strings[selected]);
 					_screen->updateScreen();
 					_system->delayMillis(50);
-					printString(_static.strings[selected], textPos, menuRect.top + selected * fh, _static.menuTable[6], 0, 5);
+					printString("%s", textPos, menuRect.top + selected * fh, _static.menuTable[6], 0, 5, _static.strings[selected]);
 					_screen->updateScreen();
 					_system->delayMillis(50);
 				}
@@ -577,7 +577,7 @@
 	for (int i = 0; i < _static.menuTable[3]; ++i) {
 		int curY = top + i * _screen->getFontHeight();
 		int color = (i == select) ? _static.menuTable[6] : _static.menuTable[5];
-		printString(_static.strings[i], ((_screen->_curDim->w >> 1) + _screen->_curDim->sx) << 3, curY, color, 0, 5);
+		printString("%s", ((_screen->_curDim->w >> 1) + _screen->_curDim->sx) << 3, curY, color, 0, 5, _static.strings[i]);
 	}
 }
 

Modified: scummvm/trunk/engines/scumm/resource.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource.cpp	2009-07-27 05:34:22 UTC (rev 42841)
+++ scummvm/trunk/engines/scumm/resource.cpp	2009-07-27 16:04:35 UTC (rev 42842)
@@ -229,7 +229,7 @@
 		sprintf(buf, "Cannot find file: '%s'\nInsert disc %d into drive %s\nPress OK to retry, Quit to exit", filename, disknum, _gameDataDir.getPath().c_str());
 #endif
 
-		result = displayMessage("Quit", buf);
+		result = displayMessage("Quit", "%s", buf);
 		if (!result) {
 			error("Cannot find file: '%s'", filename);
 		}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list