]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed compression bug
authorYann Collet <yann.collet.73@gmail.com>
Sun, 29 Nov 2015 02:17:04 +0000 (03:17 +0100)
committerYann Collet <yann.collet.73@gmail.com>
Sun, 29 Nov 2015 02:17:04 +0000 (03:17 +0100)
lib/zstd_compress.c

index 178ed07be46c45b567727d615d7546368463d476..5ca4437f9078261a9cfce5f6c16f228ad0ef3644 100644 (file)
@@ -1973,7 +1973,7 @@ size_t ZSTD_compressContinue (ZSTD_CCtx* zc,
     const BYTE* const ip = (const BYTE*) src;
 
     /* preemptive overflow correction */
-    if ((zc->base > (const BYTE*)dst) || (zc->lowLimit > (1<<30) ))
+    if ((zc->base > (const BYTE*)src) || (zc->lowLimit > (1<<30) ))
     {
         U32 correction = zc->lowLimit-1;
         ZSTD_reduceIndex(zc, correction);