From 8fe7f80d0c50fb50c41e700f2ffa694a0574641e Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 14 Sep 2019 02:38:53 +0100 Subject: HDB: Replace Unecessary Buffer in AI Inventory Code --- engines/hdb/ai-inventory.cpp | 4 ++-- engines/hdb/ai.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'engines/hdb') 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 *_hereList; Common::Array *_triggerList; - char _youGotBuffer[32]; // For printing the text of entities that are removed - // Cinematic Variables Common::Array _cine; -- cgit v1.2.3