Skip to content

Commit

Permalink
SWORD1: Use _missingSubTitleStr when asking for an out of bound textId
Browse files Browse the repository at this point in the history
It was using textId 0, which is not the subtitle we want anyway. So
instead of using the wrong subtitle, it is probably better to not display
a subtitle at all. A test case for this is with the demo when using
non-english language as several subtitles are missing toward the end.
  • Loading branch information
criezy committed Jun 5, 2012
1 parent d2c6525 commit ac76994
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/sword1/objectman.cpp
Expand Up @@ -105,7 +105,7 @@ char *ObjectMan::lockText(uint32 textId) {
addr += sizeof(Header);
if ((textId & ITM_ID) >= _resMan->readUint32(addr)) {
warning("ObjectMan::lockText(%d): only %d texts in file", textId & ITM_ID, _resMan->readUint32(addr));
textId = 0; // get first line instead
return _missingSubTitleStr;
}
uint32 offset = _resMan->readUint32(addr + ((textId & ITM_ID) + 1) * 4);
if (offset == 0) {
Expand Down

0 comments on commit ac76994

Please sign in to comment.