From 761f8dbbd22e0eb547fceda0d560faab180a72f4 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Sat, 30 Jul 2016 11:43:53 +0200 Subject: [PATCH] back to normal table cell copy --- lib/decompress/zstd_decompress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/decompress/zstd_decompress.c b/lib/decompress/zstd_decompress.c index a73543ce..a3970835 100644 --- a/lib/decompress/zstd_decompress.c +++ b/lib/decompress/zstd_decompress.c @@ -763,7 +763,7 @@ static size_t ZSTD_decompressSequences( if (nbSeq) { seqState_t seqState; dctx->fseEntropy = 1; - memcpy(seqState.prevOffset, dctx->rep, sizeof(seqState.prevOffset)); + { U32 i; for (i=0; irep[i]; } { size_t const errorCode = BIT_initDStream(&(seqState.DStream), ip, iend-ip); if (ERR_isError(errorCode)) return ERROR(corruption_detected); } FSE_initDState(&(seqState.stateLL), &(seqState.DStream), DTableLL); @@ -781,7 +781,7 @@ static size_t ZSTD_decompressSequences( /* check if reached exact end */ if (nbSeq) return ERROR(corruption_detected); /* save reps for next block */ - memcpy(dctx->rep, seqState.prevOffset, sizeof(seqState.prevOffset)); + { U32 i; for (i=0; irep[i] = (U32)(seqState.prevOffset[i]); } } /* last literal segment */