fixed compression bug

This commit is contained in:
Yann Collet 2015-11-29 03:17:04 +01:00
parent 7fe531e7ec
commit 375727310c

View 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);