[Scummvm-cvs-logs] SF.net SVN: scummvm: [24594] scummvm/trunk/engines/touche/touche.cpp

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Fri Nov 3 22:54:12 CET 2006


Revision: 24594
          http://svn.sourceforge.net/scummvm/?rev=24594&view=rev
Author:   drmccoy
Date:     2006-11-03 13:54:08 -0800 (Fri, 03 Nov 2006)

Log Message:
-----------
Fix compilation in Linux (itoa() isn't available here, it's non-standard)

Modified Paths:
--------------
    scummvm/trunk/engines/touche/touche.cpp

Modified: scummvm/trunk/engines/touche/touche.cpp
===================================================================
--- scummvm/trunk/engines/touche/touche.cpp	2006-11-03 21:32:34 UTC (rev 24593)
+++ scummvm/trunk/engines/touche/touche.cpp	2006-11-03 21:54:08 UTC (rev 24594)
@@ -2051,14 +2051,14 @@
 void ToucheEngine::drawAmountOfMoneyInInventory() {
 	if (_flagsTable[606] == 0 && !_hideInventoryTexts) {
 		char text[4];
-		itoa(_keyCharsTable[0].money, text, 10);
+		snprintf(text, sizeof(text)-1, "%d", _keyCharsTable[0].money);
 		Graphics::fillRect(_offscreenBuffer, 640, 74, 354, 40, 16, 0xD2);
 		drawGameString(16, 217, 94, 355, text);
 		updateScreenArea(_offscreenBuffer, 640, 74, 354, 74, 354, 40, 16);
 		Graphics::fillRect(_offscreenBuffer, 640, 150, 353, 40, 41, 0xD2);
 		if (_currentAmountOfMoney != 0) {
 			drawIcon(141, 348, 1);
-			itoa(_currentAmountOfMoney, text, 10);
+			snprintf(text, sizeof(text)-1, "%d", _currentAmountOfMoney);
 			drawGameString(16, 217, 170, 378, text);
 		}
 		updateScreenArea(_offscreenBuffer, 640, 150, 353, 150, 353, 40, 41);


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