diff options
author | Eugene Sandulenko | 2016-05-13 09:23:20 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-13 09:23:20 +0200 |
commit | 8577606b04c39653a90f696e6e2285653a374628 (patch) | |
tree | 15a67d134814249bbd50548f78f86afb0ffe3975 /engines/lure/game.cpp | |
parent | d8caeed074a5cfbf512373da582e7f34f2e7d991 (diff) | |
download | scummvm-rg350-8577606b04c39653a90f696e6e2285653a374628.tar.gz scummvm-rg350-8577606b04c39653a90f696e6e2285653a374628.tar.bz2 scummvm-rg350-8577606b04c39653a90f696e6e2285653a374628.zip |
LURE: Safer string manipulation
Diffstat (limited to 'engines/lure/game.cpp')
-rw-r--r-- | engines/lure/game.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp index 38ca0ba54f..371bcd6ed6 100644 --- a/engines/lure/game.cpp +++ b/engines/lure/game.cpp @@ -538,7 +538,7 @@ void Game::handleRightClickMenu() { hotspot = res.getHotspot(room.hotspotId()); assert(hotspot); strings.getString(hotspot->nameId, statusLine); - strcat(statusLine, stringList.getString(S_FOR)); + Common::strlcat(statusLine, stringList.getString(S_FOR), MAX_DESC_SIZE); statusLine += strlen(statusLine); itemId = PopupMenu::ShowItems(GET, player->roomNumber()); @@ -549,7 +549,7 @@ void Game::handleRightClickMenu() { hotspot = res.getHotspot(room.hotspotId()); assert(hotspot); strings.getString(hotspot->nameId, statusLine); - strcat(statusLine, stringList.getString(S_TO)); + Common::strlcat(statusLine, stringList.getString(S_TO), MAX_DESC_SIZE); breakFlag = GetTellActions(); break; @@ -559,7 +559,7 @@ void Game::handleRightClickMenu() { case DRINK: hasItems = (res.numInventoryItems() != 0); if (!hasItems) - strcat(statusLine, stringList.getString(S_ACTION_NOTHING)); + Common::strlcat(statusLine, stringList.getString(S_ACTION_NOTHING), MAX_DESC_SIZE); statusLine += strlen(statusLine); room.update(); @@ -579,9 +579,9 @@ void Game::handleRightClickMenu() { assert(useHotspot); strings.getString(useHotspot->nameId, statusLine); if (action == GIVE) - strcat(statusLine, stringList.getString(S_TO)); + Common::strlcat(statusLine, stringList.getString(S_TO), MAX_DESC_SIZE); else - strcat(statusLine, stringList.getString(S_ON)); + Common::strlcat(statusLine, stringList.getString(S_ON), MAX_DESC_SIZE); statusLine += strlen(statusLine); } else if ((action == DRINK) || (action == EXAMINE)) |