]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix failing unit test
authorSean Purcell <me@seanp.xyz>
Thu, 9 Feb 2017 20:27:32 +0000 (12:27 -0800)
committerSean Purcell <me@seanp.xyz>
Thu, 9 Feb 2017 20:27:39 +0000 (12:27 -0800)
tests/fuzzer.c

index 4239af4558b88e853a20aa81b96ce06a242d0c50..603c74c2abcdc6d6fd34a3ec494395fbae678c6f 100644 (file)
@@ -220,7 +220,7 @@ static int basicUnitTests(U32 seed, double compressibility)
 
         DISPLAYLEVEL(4, "test%3i : load dictionary into context : ", testNb++);
         CHECK( ZSTD_compressBegin_usingDict(ctxOrig, CNBuffer, dictSize, 2) );
-        CHECK( ZSTD_copyCCtx(ctxDuplicated, ctxOrig, CNBuffSize - dictSize) );
+        CHECK( ZSTD_copyCCtx(ctxDuplicated, ctxOrig, 0) ); /* Begin_usingDict implies unknown srcSize, so match that */
         DISPLAYLEVEL(4, "OK \n");
 
         DISPLAYLEVEL(4, "test%3i : compress with flat dictionary : ", testNb++);