mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
TITANIC: Fix to processing textual numbers in sentences
This commit is contained in:
parent
eaab1f0472
commit
99d50975cc
@ -402,7 +402,7 @@ int TTparser::replaceNumbers(TTstring &line, int startIndex) {
|
||||
int total = 0, factor = 0;
|
||||
|
||||
do {
|
||||
if (numEntry->_flags & NF_1) {
|
||||
if (!(numEntry->_flags & NF_1)) {
|
||||
flag2 = true;
|
||||
if (numEntry->_flags & NF_8)
|
||||
flag1 = true;
|
||||
@ -437,8 +437,13 @@ int TTparser::replaceNumbers(TTstring &line, int startIndex) {
|
||||
total = -total;
|
||||
|
||||
CString numStr = CString::format("%d", total);
|
||||
line = CString(line.c_str(), line.c_str() + startIndex) + numStr +
|
||||
CString(line.c_str() + index);
|
||||
line = CString::format("%s%s%s",
|
||||
CString(line.c_str(), line.c_str() + startIndex).c_str(),
|
||||
numStr.c_str(),
|
||||
(index == -1) ? "" : line.c_str() + index
|
||||
);
|
||||
|
||||
index = startIndex + numStr.size();
|
||||
return index;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user