[Scummvm-git-logs] scummvm master -> 8fe7f80d0c50fb50c41e700f2ffa694a0574641e

digitall dgturner at iee.org
Sat Sep 14 03:42:32 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8fe7f80d0c HDB: Replace Unecessary Buffer in AI Inventory Code


Commit: 8fe7f80d0c50fb50c41e700f2ffa694a0574641e
    https://github.com/scummvm/scummvm/commit/8fe7f80d0c50fb50c41e700f2ffa694a0574641e
Author: D G Turner (digitall at scummvm.org)
Date: 2019-09-14T02:38:53+01:00

Commit Message:
HDB: Replace Unecessary Buffer in AI Inventory Code

Changed paths:
    engines/hdb/ai-inventory.cpp
    engines/hdb/ai.h


diff --git a/engines/hdb/ai-inventory.cpp b/engines/hdb/ai-inventory.cpp
index 3c8d2c2..abdfc27 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 600fcaf..a456cde 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;
 





More information about the Scummvm-git-logs mailing list