diff options
Diffstat (limited to 'scumm/string.cpp')
-rw-r--r-- | scumm/string.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp index 3e1a3b05e3..427310eeb0 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -569,7 +569,7 @@ int ScummEngine::addMessageToStack(const byte *msg, byte *dst, int dstSize) { return 0; } - if (_version >= 7 && msg[0] == '/') { + if (_version >= 7) { translateText(msg, transBuf); src = transBuf; } else { @@ -649,7 +649,7 @@ int ScummEngine::addMessageToStack(const byte *msg, byte *dst, int dstSize) { error("addMessageToStack: buffer overflow!"); } *dst = 0; - + return dstSize - (end - dst); } @@ -896,6 +896,8 @@ void ScummEngine::loadLanguageBundle() { // That was another index entry _languageIndexSize++; + } else { + error("Unknwon languag.bnd entry found: '%s'\n", ptr); } // Skip over newlines (and turn them into null bytes) @@ -955,6 +957,9 @@ void ScummEngine::translateText(const byte *text, byte *trans_buff) { LangIndexNode *found = NULL; int i; + trans_buff[0] = 0; + _lastStringTag[0] = 0; + if (_version >= 7 && text[0] == '/') { // Extract the string tag from the text: /..../ for (i = 0; (i < 12) && (text[i + 1] != '/'); i++) |