]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
adhere to min dict size
authorPaul Cruz <paulcruz74@fb.com>
Tue, 20 Jun 2017 00:37:14 +0000 (17:37 -0700)
committerPaul Cruz <paulcruz74@fb.com>
Tue, 20 Jun 2017 00:37:14 +0000 (17:37 -0700)
tests/decodecorpus.c

index 4b42c6d7cbfe4ca7f12d8eb8077ec1fb8fd66f1b..f5cfd6288c092990ad2f7d1b69f307cd7fafd65e 100644 (file)
@@ -1388,7 +1388,7 @@ static int runTestMode(U32 seed, unsigned numFiles, unsigned const testDurationS
         }
         {
             /* don't create a dictionary that is too big */
-            size_t const dictSize = RAND(&seed) % (10 << 20);
+            size_t const dictSize = RAND(&seed) % (10 << 20) + ZDICT_DICTSIZE_MIN;
             size_t const r = testDecodeWithDict(seed, dictSize);
             if (ZSTD_isError(r)) {
                 DISPLAY("Error in dictionary mode on test seed %u: %s\n", seed+fnum, ZSTD_getErrorName(r));