aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2019-09-14 02:38:53 +0100
committerD G Turner2019-09-14 02:38:53 +0100
commit8fe7f80d0c50fb50c41e700f2ffa694a0574641e (patch)
tree7e9656d2902325ac1c39f036bee1fb9cfd13810a
parent64e2a21a176861b1cf5969aa9e2631523becb3e8 (diff)
downloadscummvm-rg350-8fe7f80d0c50fb50c41e700f2ffa694a0574641e.tar.gz
scummvm-rg350-8fe7f80d0c50fb50c41e700f2ffa694a0574641e.tar.bz2
scummvm-rg350-8fe7f80d0c50fb50c41e700f2ffa694a0574641e.zip
HDB: Replace Unecessary Buffer in AI Inventory Code
-rw-r--r--engines/hdb/ai-inventory.cpp4
-rw-r--r--engines/hdb/ai.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/engines/hdb/ai-inventory.cpp b/engines/hdb/ai-inventory.cpp
index 3c8d2c2b55..abdfc2722d 100644
--- a/engines/hdb/ai-inventory.cpp
+++ b/engines/hdb/ai-inventory.cpp
@@ -271,8 +271,8 @@ void AI::printYouGotMsg(const char *name) {
if (!name || !name[0])
return;
- sprintf(_youGotBuffer, "Got %s", name);
- g_hdb->_window->textOut(_youGotBuffer, kYouGotX, g_hdb->_ai->_youGotY, 120);
+ Common::String youGotString = Common::String::format("Got %s", name);
+ g_hdb->_window->textOut(youGotString.c_str(), kYouGotX, g_hdb->_ai->_youGotY, 120);
}
void AI::newDelivery(const char *itemTextName, const char *itemGfxName, const char *destTextName, const char *destGfxName, const char *id) {
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index 600fcaf5c6..a456cde782 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -1315,8 +1315,6 @@ public:
Common::Array<HereT *> *_hereList;
Common::Array<Trigger *> *_triggerList;
- char _youGotBuffer[32]; // For printing the text of entities that are removed
-
// Cinematic Variables
Common::Array<CineCommand *> _cine;