From 0e88f6e97b62bbb66f5ac917c7d560dfb7ca4dab Mon Sep 17 00:00:00 2001 From: conor42 Date: Thu, 11 Jan 2018 11:42:58 +1000 Subject: [PATCH] Fix break condition in decompression noise test The bug prevents noise being added --- tests/fuzzer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fuzzer.c b/tests/fuzzer.c index 141bf654..0f82ee61 100644 --- a/tests/fuzzer.c +++ b/tests/fuzzer.c @@ -1412,7 +1412,7 @@ static int fuzzerTests(U32 seed, U32 nbTests, unsigned startTest, U32 const maxD size_t const skipLength = FUZ_rand(&lseed) & mask; pos += skipLength; } - if (pos <= cSize) break; + if (pos >= cSize) break; /* add noise */ { U32 const nbBitsCodes = FUZ_rand(&lseed) % maxNbBits; U32 const nbBits = nbBitsCodes ? nbBitsCodes-1 : 0;