aboutsummaryrefslogtreecommitdiff
path: root/engines/touche/touche.cpp
diff options
context:
space:
mode:
authorD G Turner2019-09-15 00:46:59 +0100
committerD G Turner2019-09-15 00:46:59 +0100
commitb17ca955691c61a814e8cdc623e450e58f3bed4c (patch)
tree7d5c4b2614f4b71e948b93c35a960e93d144a771 /engines/touche/touche.cpp
parent9467bf7faa89d21b81f415c352272e8de1f52302 (diff)
downloadscummvm-rg350-b17ca955691c61a814e8cdc623e450e58f3bed4c.tar.gz
scummvm-rg350-b17ca955691c61a814e8cdc623e450e58f3bed4c.tar.bz2
scummvm-rg350-b17ca955691c61a814e8cdc623e450e58f3bed4c.zip
TOUCHE: Remove Various Fixed Sized String Buffer Usage
Diffstat (limited to 'engines/touche/touche.cpp')
-rw-r--r--engines/touche/touche.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 4414ed1918..e8a867a96a 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -2194,16 +2194,15 @@ void ToucheEngine::drawInventory(int index, int flag) {
void ToucheEngine::drawAmountOfMoneyInInventory() {
if (_flagsTable[606] == 0 && !_hideInventoryTexts) {
- char text[10];
- sprintf(text, "%d", _keyCharsTable[0].money);
+ Common::String textStr = Common::String::format("%d", _keyCharsTable[0].money);
Graphics::fillRect(_offscreenBuffer, kScreenWidth, 74, 354, 40, 16, 0xD2);
- drawGameString(217, 94, 355, text);
+ drawGameString(217, 94, 355, textStr.c_str());
updateScreenArea(74, 354, 40, 16);
Graphics::fillRect(_offscreenBuffer, kScreenWidth, 150, 353, 40, 41, 0xD2);
if (_currentAmountOfMoney != 0) {
drawIcon(141, 348, 1);
- sprintf(text, "%d", _currentAmountOfMoney);
- drawGameString(217, 170, 378, text);
+ textStr = Common::String::format("%d", _currentAmountOfMoney);
+ drawGameString(217, 170, 378, textStr.c_str());
}
updateScreenArea(150, 353, 40, 41);
}