diff options
-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; } |