diff options
author | Paul Gilbert | 2015-05-09 09:09:10 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-05-09 09:09:10 -0400 |
commit | 47bcb5358acddc3ef75f5a4af59ba43f06027490 (patch) | |
tree | 3f2219a51f218771dac17320d35a6ea0178b597f /engines | |
parent | 1ef5b667925d5813bde6aba2392e3cb19cb08f22 (diff) | |
download | scummvm-rg350-47bcb5358acddc3ef75f5a4af59ba43f06027490.tar.gz scummvm-rg350-47bcb5358acddc3ef75f5a4af59ba43f06027490.tar.bz2 scummvm-rg350-47bcb5358acddc3ef75f5a4af59ba43f06027490.zip |
SHERLOCK: Cleanup fix for decompress
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sherlock/decompress.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/sherlock/decompress.cpp b/engines/sherlock/decompress.cpp index b319bc90c8..7c98b50543 100644 --- a/engines/sherlock/decompress.cpp +++ b/engines/sherlock/decompress.cpp @@ -48,7 +48,7 @@ Common::SeekableReadStream *decompressLZ(Common::SeekableReadStream &source, int lzWindowPos = 0xFEE; cmd = 0; - while (1) { + do { cmd >>= 1; if (!(cmd & 0x100)) cmd = source.readByte() | 0xFF00; @@ -72,9 +72,7 @@ Common::SeekableReadStream *decompressLZ(Common::SeekableReadStream &source, int lzWindowPos = (lzWindowPos + 1) & 0x0FFF; } } - if (outBuffer >= outBufferEnd) - break; - } + } while (outBuffer < outBufferEnd); return outS; } |