aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2011-12-13 16:17:06 +0100
committerJohannes Schickel2011-12-13 16:18:12 +0100
commit77959acd51982d9fedec94ac07241b1702681c6a (patch)
treef86b30143e27e76d2bddadd4c24d1aa10cf70b4c /engines/kyra
parentefa52cb79c35a78e624f42e4ab919c6016bdadcf (diff)
downloadscummvm-rg350-77959acd51982d9fedec94ac07241b1702681c6a.tar.gz
scummvm-rg350-77959acd51982d9fedec94ac07241b1702681c6a.tar.bz2
scummvm-rg350-77959acd51982d9fedec94ac07241b1702681c6a.zip
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.
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/sequences_hof.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index 50b5db78fc..b27f0df137 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -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 {