diff options
author | Eugene Sandulenko | 2016-05-10 13:41:40 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-10 18:07:35 +0200 |
commit | 0d356d1c666620fc01d60872edb03ee55b046689 (patch) | |
tree | 9c605bc7319768a47539d6fd34d38dddf76cf3fd /engines/agi/text.cpp | |
parent | 2e77891b9ed09759533c725daec47c77fdbd0bf4 (diff) | |
download | scummvm-rg350-0d356d1c666620fc01d60872edb03ee55b046689.tar.gz scummvm-rg350-0d356d1c666620fc01d60872edb03ee55b046689.tar.bz2 scummvm-rg350-0d356d1c666620fc01d60872edb03ee55b046689.zip |
AGI: Safer string copying
Diffstat (limited to 'engines/agi/text.cpp')
-rw-r--r-- | engines/agi/text.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp index 110ba10632..274a654547 100644 --- a/engines/agi/text.cpp +++ b/engines/agi/text.cpp @@ -457,7 +457,7 @@ void TextMgr::drawMessageBox(const char *textPtr, int16 forcedHeight, int16 want // Caller wants to force specified width/height? set it if (forcedHeight) _messageState.textSize_Height = forcedHeight; - + if (forcedWidth) { if (wantedWidth) _messageState.textSize_Width = wantedWidth; @@ -1207,7 +1207,7 @@ char *TextMgr::stringPrintf(const char *originalText) { } assert(resultString.size() < sizeof(resultPrintfBuffer)); - strcpy(resultPrintfBuffer, resultString.c_str()); + Common::strlcpy(resultPrintfBuffer, resultString.c_str(), 2000); return resultPrintfBuffer; } |