[libFuzzer] fix 32-bit build
authorKostya Serebryany <kcc@google.com>
Thu, 8 Oct 2015 00:59:25 +0000 (00:59 +0000)
committerKostya Serebryany <kcc@google.com>
Thu, 8 Oct 2015 00:59:25 +0000 (00:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249646 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Fuzzer/FuzzerMutate.cpp

index 0e8429b..74ae0cb 100644 (file)
@@ -61,7 +61,7 @@ static char RandCh(FuzzerRandomBase &Rand) {
 size_t MutationDispatcher::Mutate_ShuffleBytes(uint8_t *Data, size_t Size,
                                                size_t MaxSize) {
   assert(Size);
-  size_t ShuffleAmount = Rand(std::min(Size, 8UL)) + 1;  // [1,8] and <= Size.
+  size_t ShuffleAmount = Rand(std::min(Size, (size_t)8)) + 1;  // [1,8] and <= Size.
   size_t ShuffleStart = Rand(Size - ShuffleAmount);
   assert(ShuffleStart + ShuffleAmount <= Size);
   std::random_shuffle(Data + ShuffleStart, Data + ShuffleStart + ShuffleAmount,