aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2013-08-18 09:28:54 +0200
committerTorbjörn Andersson2013-08-18 09:28:54 +0200
commit84d1d28373d782464bd46b10abd6b092f7eb6367 (patch)
tree9873ae6fd24452ca7d4a9be13c9ab57a472ad7ba /engines
parente81d8d8112a1dc7e81bcd7eff5b2b601f64cfd75 (diff)
downloadscummvm-rg350-84d1d28373d782464bd46b10abd6b092f7eb6367.tar.gz
scummvm-rg350-84d1d28373d782464bd46b10abd6b092f7eb6367.tar.bz2
scummvm-rg350-84d1d28373d782464bd46b10abd6b092f7eb6367.zip
SCUMM: Read the SMAP size, not the SMAP tag itself
This will obviously make 'smapLen' a lot smaller in most cases, so there may be regressions. But I hope this is correct, though I don't know why the size is big-endian while the offset is little- endian.
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/gfx.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 4c1fdaf673..4d65ccc88a 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -1888,7 +1888,7 @@ bool Gdi::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int width,
if (stripnr * 4 + 4 < smapLen)
offset = READ_LE_UINT32(smap_ptr + stripnr * 4 + 4);
} else {
- smapLen = READ_BE_UINT32(smap_ptr);
+ smapLen = READ_BE_UINT32(smap_ptr + 4);
if (stripnr * 4 + 8 < smapLen)
offset = READ_LE_UINT32(smap_ptr + stripnr * 4 + 8);
}