aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi/text.cpp')
-rw-r--r--engines/agi/text.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 0cacce2421..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;
@@ -885,6 +885,12 @@ void TextMgr::stringEdit(int16 stringMaxLen) {
_inputStringRow = _textPos.row;
_inputStringColumn = _textPos.column;
+ if (_inputCursorChar) {
+ // Cursor character is shown, which means we are one beyond the start of the input
+ // Adjust the column for predictive input dialog
+ _inputStringColumn--;
+ }
+
// Caller can set the input string
_inputStringCursorPos = 0;
while (_inputStringCursorPos < inputStringLen) {
@@ -1201,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;
}