diff --git a/tests/zstreamtest.c b/tests/zstreamtest.c index 2c25adf3c..93032d21e 100644 --- a/tests/zstreamtest.c +++ b/tests/zstreamtest.c @@ -958,7 +958,7 @@ static int basicUnitTests(U32 seed, double compressibility, int bigTests) break; out.size = MIN(out.size + cSize / 4, compressedBufferSize); } - CHECK_Z(ZSTD_decompress(decodedBuffer, CNBufferSize, compressedBuffer, cSize)); + CHECK_Z(ZSTD_decompress(decodedBuffer, CNBufferSize, compressedBuffer, out.pos)); DISPLAYLEVEL(3, "OK \n"); DISPLAYLEVEL(3, "test%3i : ZSTD_compressStream2() ZSTD_c_stableInBuffer modify buffer : ", testNb++);