KYRA: Cast char to uint8 before passing it to getCharWidth.

This assures getCharWidth really gets the character number and now sign
extended version of it in case char is signed.
This commit is contained in:
Johannes Schickel 2011-12-13 16:17:06 +01:00
parent efa52cb79c
commit 77959acd51

View file

@ -2622,7 +2622,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int
while (*str2) {
cChar[0] = *str2;
_screen->printText(cChar, x, y, col1++, 0);
x += _screen->getCharWidth(*str2++);
x += _screen->getCharWidth((uint8)*str2++);
}
palCycle = true;
} else if (!strcmp(str, specialData[1])) {
@ -2631,7 +2631,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int
while (*str2) {
cChar[0] = *str2;
_screen->printText(cChar, x, y, col1--, 0);
x += _screen->getCharWidth(*str2++);
x += _screen->getCharWidth((uint8)*str2++);
}
palCycle = true;
} else {