diff -ruN scummvm-20090214-orig/engines/sword1/objectman.cpp scummvm-20090214/engines/sword1/objectman.cpp
old
|
new
|
|
109 | 109 | uint32 offset = _resMan->readUint32(addr + ((textId & ITM_ID) + 1)* 4); |
110 | 110 | if (offset == 0) { |
111 | 111 | warning("ObjectMan::lockText(%d): text number has no text lines", textId); |
112 | | return _errorStr; |
| 112 | return _missingSubTitleStr; |
113 | 113 | } |
114 | 114 | return addr + offset; |
115 | 115 | } |
… |
… |
|
161 | 161 | memcpy(dest, _liveList, TOTAL_SECTIONS * sizeof(uint16)); |
162 | 162 | } |
163 | 163 | |
164 | | char ObjectMan::_errorStr[] = "Error: Text not found."; |
| 164 | // String displayed when a subtitle sentence is missing in the cluster file. |
| 165 | // It happens with at least on sentence in Syria in some langages (see bug #1977094). |
| 166 | // Note: an empty string or a null pointer causes a crash. |
| 167 | char ObjectMan::_missingSubTitleStr[] = " "; |
165 | 168 | |
166 | 169 | } // End of namespace Sword1 |
diff -ruN scummvm-20090214-orig/engines/sword1/objectman.h scummvm-20090214/engines/sword1/objectman.h
old
|
new
|
|
61 | 61 | static const uint32 _textList[TOTAL_SECTIONS][7]; //a table of pointers to text files |
62 | 62 | uint16 _liveList[TOTAL_SECTIONS]; //which sections are active |
63 | 63 | uint8 *_cptData[TOTAL_SECTIONS]; |
64 | | static char _errorStr[]; |
| 64 | static char _missingSubTitleStr[]; |
65 | 65 | }; |
66 | 66 | |
67 | 67 | } // End of namespace Sword1 |