From e3d1b4e020d9b34ebfa688270e2a1ca3fd4fecdf Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 28 Nov 2014 02:48:21 +0100 Subject: [PATCH] Fixed decompression bug --- lz4.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lz4.c b/lz4.c index b3f1b2d..2a6f038 100644 --- a/lz4.c +++ b/lz4.c @@ -1033,9 +1033,12 @@ FORCE_INLINE int LZ4_decompress_generic( if (unlikely(cpy>oend-12)) { if (cpy > oend-LASTLITERALS) goto _output_error; /* Error : last LASTLITERALS bytes must be literals */ - if (op < oend-8) LZ4_wildCopy(op, match, oend-8); - match += oend-8 - op; - op = oend-8; + if (op < oend-8) + { + LZ4_wildCopy(op, match, oend-8); + match += oend-8 - op; + op = oend-8; + } while (op