aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorBertrand Augereau2011-07-17 15:25:46 +0200
committerBertrand Augereau2011-07-18 22:59:17 +0200
commit825e736aeded8a52cbdc060c3a0d587d24273d72 (patch)
treed9ca8b09e66aa3c1c9ce3fe48563e02391f02fbb /engines/dreamweb
parent9072ecf781bb8fd116a02530631d3cfa1e44648b (diff)
downloadscummvm-rg350-825e736aeded8a52cbdc060c3a0d587d24273d72.tar.gz
scummvm-rg350-825e736aeded8a52cbdc060c3a0d587d24273d72.tar.bz2
scummvm-rg350-825e736aeded8a52cbdc060c3a0d587d24273d72.zip
DREAMWEB: getnextword doesn't read one byte too far any more
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/stubs.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index e7fb421353..a2bfd5b96a 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -221,9 +221,7 @@ void DreamGenContext::getnextword() {
uint8 totalWidth = 0;
bh = 0;
while(true) {
- ax = es.word(di);
- uint8 firstChar = al;
- uint8 secondChar = ah;
+ uint8 firstChar = es.byte(di);
++di;
++bh;
if ((firstChar == ':') || (firstChar == 0)) { //endall
@@ -240,6 +238,7 @@ void DreamGenContext::getnextword() {
}
firstChar = engine->modifyChar(firstChar);
if (firstChar != 255) {
+ uint8 secondChar = es.byte(di);
uint8 width = ds.byte(6*(firstChar - 32 + data.word(kCharshift)));
width = kernchars(firstChar, secondChar, width);
totalWidth += width;