aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMarisa-Chan2015-01-28 09:26:45 +0600
committerMarisa-Chan2015-01-28 09:26:45 +0600
commitf46af2eded0155a05d0e19717e6c4efd1191dab3 (patch)
treead45c214deebe1762eaa5927ea699f4353b4c778 /engines
parenta1a99745f6f120354c0565e96e0636c0d303ed52 (diff)
downloadscummvm-rg350-f46af2eded0155a05d0e19717e6c4efd1191dab3.tar.gz
scummvm-rg350-f46af2eded0155a05d0e19717e6c4efd1191dab3.tar.bz2
scummvm-rg350-f46af2eded0155a05d0e19717e6c4efd1191dab3.zip
ZVISION: Fix bug #6787 init lzss window by same values as in original game
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/file/lzss_read_stream.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/zvision/file/lzss_read_stream.cpp b/engines/zvision/file/lzss_read_stream.cpp
index 6f27eaa765..ca10af7d72 100644
--- a/engines/zvision/file/lzss_read_stream.cpp
+++ b/engines/zvision/file/lzss_read_stream.cpp
@@ -31,8 +31,9 @@ LzssReadStream::LzssReadStream(Common::SeekableReadStream *source)
// It's convention to set the starting cursor position to blockSize - 16
_windowCursor(0x0FEE),
_eosFlag(false) {
- // Clear the window to null
- memset(_window, 0, BLOCK_SIZE);
+ // All values up to _windowCursor inits by 0x20
+ memset(_window, 0x20, _windowCursor);
+ memset(_window + _windowCursor, 0, BLOCK_SIZE - _windowCursor);
}
uint32 LzssReadStream::decompressBytes(byte *destination, uint32 numberOfBytes) {