Skip to content

Commit

Permalink
TITANIC: Properly handle uppercase and 's when normalizing conv text
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jan 28, 2017
1 parent ca55163 commit 927f533
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions engines/titanic/true_talk/tt_parser.cpp
Expand Up @@ -131,7 +131,7 @@ int TTparser::normalize(TTsentence *sentence) {
if (!destLine->empty() && destLine->lastChar() != ' ')
(*destLine) += ' ';
} else if (Common::isUpper(c)) {
(*destLine) += toupper(c);
(*destLine) += tolower(c);
} else if (Common::isDigit(c)) {
if (c == '0' && isEmoticon(srcLine, index)) {
sentence->set38(10);
Expand Down Expand Up @@ -256,7 +256,7 @@ int TTparser::isEmoticon(const TTstring &str, int &index) {
}
}

bool TTparser::normalizeContraction(const TTstring &srcLine, int srcIndex, TTstring &destLine) {
bool TTparser::normalizeContraction(const TTstring &srcLine, int &srcIndex, TTstring &destLine) {
int startIndex = srcIndex + 1;
switch (srcLine[startIndex]) {
case 'd':
Expand Down
2 changes: 1 addition & 1 deletion engines/titanic/true_talk/tt_parser.h
Expand Up @@ -95,7 +95,7 @@ class TTparser {
* Submethod called by normalize to handle expanding contacted word pairs
* like can't, should've, and so on.
*/
bool normalizeContraction(const TTstring &srcLine, int srcIndex, TTstring &destLine);
bool normalizeContraction(const TTstring &srcLine, int &srcIndex, TTstring &destLine);

/**
* Checks for what is likely special developer cheat codes
Expand Down

0 comments on commit 927f533

Please sign in to comment.