aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2004-09-09 10:08:39 +0000
committerEugene Sandulenko2004-09-09 10:08:39 +0000
commitb4fa1914e463d10e5dd0288c1ddc7cb6351a445a (patch)
tree16df34de31bf8f34b97ad97a4ed56a00a6b0014a
parent84549db76a8f2d46a70cad9c3dce901f4d2d2fb0 (diff)
downloadscummvm-rg350-b4fa1914e463d10e5dd0288c1ddc7cb6351a445a.tar.gz
scummvm-rg350-b4fa1914e463d10e5dd0288c1ddc7cb6351a445a.tar.bz2
scummvm-rg350-b4fa1914e463d10e5dd0288c1ddc7cb6351a445a.zip
Fix bug in ScummEngine_v7he::getCharsetOffset()
svn-id: r14978
-rw-r--r--scumm/script_v7he.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp
index 97c13298b8..4f785a3a2f 100644
--- a/scumm/script_v7he.cpp
+++ b/scumm/script_v7he.cpp
@@ -411,7 +411,7 @@ int ScummEngine_v7he::getCharsetOffset(int letter) {
if (!ptr)
error("getCharsetOffset: charset %d not found!", _string[0]._default.charset);
- offset = READ_LE_UINT32(ptr + 29 + letter);
+ offset = READ_LE_UINT32(ptr + 29 + letter * 4 + 4);
if (offset == 0)
return 0;
@@ -421,7 +421,7 @@ int ScummEngine_v7he::getCharsetOffset(int letter) {
byte start = *ptr;
if (result >= 0x80) {
- result = result - 256 + start;
+ result = (result & 0xff) - 256 + start;
} else {
result += start;
};