mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-19 08:06:42 +00:00
HOPKINS: Add workaround to fix issue with text display showing one character too many.
This commit is contained in:
parent
2bf5306353
commit
450114802a
@ -268,6 +268,7 @@ void FontManager::BOITE(int idx, int messageId, const Common::String &filename,
|
|||||||
v59 = v59 + 1;
|
v59 = v59 + 1;
|
||||||
++v63;
|
++v63;
|
||||||
} while (v63 < v69);
|
} while (v63 < v69);
|
||||||
|
|
||||||
v60 = texte_tmp;
|
v60 = texte_tmp;
|
||||||
v64 = 0;
|
v64 = 0;
|
||||||
if (v69) {
|
if (v69) {
|
||||||
@ -337,8 +338,16 @@ LABEL_55:
|
|||||||
LABEL_57:
|
LABEL_57:
|
||||||
v20 = lineCount;
|
v20 = lineCount;
|
||||||
v21 = v11;
|
v21 = v11;
|
||||||
Txt[idx].lines[v20] = Common::String((const char *)v61 + v65, lineSize);
|
|
||||||
TRIER_TEXT[lineCount++] = lineSize;
|
// WORKAROUND: Perhaps due to the usage of ScummVM strings here, recalculate what the
|
||||||
|
// actual length of the line to be copied will be. Otherwise, you can see artifacts,
|
||||||
|
// such as a single character beyond the end of string NULL.
|
||||||
|
int actualSize = 0;
|
||||||
|
while (actualSize < lineSize && *(v61 + v65 + actualSize))
|
||||||
|
++actualSize;
|
||||||
|
|
||||||
|
Txt[idx].lines[v20] = Common::String((const char *)v61 + v65, actualSize);
|
||||||
|
TRIER_TEXT[lineCount++] = actualSize;
|
||||||
|
|
||||||
v65 += lineSize;
|
v65 += lineSize;
|
||||||
v11 = v21;
|
v11 = v21;
|
||||||
|
Loading…
Reference in New Issue
Block a user