From 22d79762ef3e5c3760975742af10e8874958c13b Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 28 Feb 2017 02:12:42 -0800 Subject: [PATCH] fixed multi frames --- lib/decompress/zstd_decompress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/decompress/zstd_decompress.c b/lib/decompress/zstd_decompress.c index 1252b2c3..5aa863af 100644 --- a/lib/decompress/zstd_decompress.c +++ b/lib/decompress/zstd_decompress.c @@ -2307,8 +2307,9 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB if (cSize <= (size_t)(iend-istart)) { size_t const decompressedSize = ZSTD_decompress_usingDDict(zds->dctx, op, oend-op, istart, cSize, zds->ddict); if (ZSTD_isError(decompressedSize)) return decompressedSize; - ip += cSize; + ip = istart + cSize; op += decompressedSize; + zds->dctx->expected = 0; zds->stage = zdss_init; someMoreWork = 0; break;