diff options
Diffstat (limited to 'engines/titanic/true_talk/tt_parser.cpp')
-rw-r--r-- | engines/titanic/true_talk/tt_parser.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/titanic/true_talk/tt_parser.cpp b/engines/titanic/true_talk/tt_parser.cpp index 5aa3576a0f..343d0aa7d1 100644 --- a/engines/titanic/true_talk/tt_parser.cpp +++ b/engines/titanic/true_talk/tt_parser.cpp @@ -37,7 +37,7 @@ int TTparser::processInput(TTinput *input) { int TTparser::normalize(TTinput *input) { TTstring *destLine = new TTstring(); - const TTstring &srcLine = input->_line; + const TTstring &srcLine = input->_initialLine; int srcSize = srcLine.size(); int savedIndex = 0; int counter1 = 0; @@ -136,6 +136,17 @@ int TTparser::normalize(TTinput *input) { } } + if (counter1 >= 4) + input->set38(4); + + // Remove any trailing spaces + while (destLine->hasSuffix(" ")) + destLine->deleteLastChar(); + + // Copy out the normalized line + input->_normalizedLine = *destLine; + delete destLine; + return 0; } |