]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
dumpsEnd
authorinikep <inikep@gmail.com>
Tue, 9 Feb 2016 20:12:23 +0000 (21:12 +0100)
committerinikep <inikep@gmail.com>
Tue, 9 Feb 2016 20:12:23 +0000 (21:12 +0100)
lib/zstd_compress.c

index d5682811fa6ebe6046f29b70fdf673605b21f5b9..ac53662a084a69f2259f8bf00a38768bb864eade 100644 (file)
@@ -240,7 +240,8 @@ static size_t ZSTD_resetCCtx_advanced (ZSTD_CCtx* zc,
     zc->seqStore.litLengthStart =  zc->seqStore.litStart + blockSize;
     zc->seqStore.matchLengthStart = zc->seqStore.litLengthStart + (blockSize>>2);
     zc->seqStore.dumpsStart = zc->seqStore.matchLengthStart + (blockSize>>2);
-    zc->seqStore.litFreq = (U32*) (zc->seqStore.dumpsStart + (blockSize>>2));
+    BYTE* dumpsEnd= zc->seqStore.dumpsStart + (blockSize>>2);
+    zc->seqStore.litFreq = (U32*)(dumpsEnd);
     zc->seqStore.litLengthFreq = zc->seqStore.litFreq + (1<<Litbits);
     zc->seqStore.matchLengthFreq = zc->seqStore.litLengthFreq + (1<<LLbits);
     zc->seqStore.offCodeFreq = zc->seqStore.matchLengthFreq + (1<<MLbits);