aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/touche/touche.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 0b418b5e6b..0f9200601b 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -2051,14 +2051,14 @@ void ToucheEngine::drawInventory(int index, int flag) {
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);