aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/text.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-10 13:41:40 +0200
committerEugene Sandulenko2016-05-10 18:07:35 +0200
commit0d356d1c666620fc01d60872edb03ee55b046689 (patch)
tree9c605bc7319768a47539d6fd34d38dddf76cf3fd /engines/agi/text.cpp
parent2e77891b9ed09759533c725daec47c77fdbd0bf4 (diff)
downloadscummvm-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.cpp4
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;
}