[libFuzzer] fix a warning from Wunreachable-code-loop-increment reported by Christian Holler. This also fixes a logical bug, which however does not affect the libFuzzer's ability too much (I wasn't able to create a differentiating test)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303087 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany 2017-05-15 17:39:42 +00:00
parent e6202480d9
commit 9f23ac318f

View File

@ -222,7 +222,7 @@ DictionaryEntry MutationDispatcher::MakeDictionaryEntryFromCMP(
if (!Cur) break;
Positions[NumPositions++] = Cur - Data;
}
if (!NumPositions) break;
if (!NumPositions) continue;
return DictionaryEntry(W, Positions[Rand(NumPositions)]);
}
DictionaryEntry DE(W);