Skip to content

Commit

Permalink
test_fuzzer: Patched to compile on Visual Studio.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jan 4, 2025
1 parent 20574c0 commit c9c991b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/test/SDL_test_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,17 @@ Sint32 SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax)
Uint64 range;

if (pMin > pMax) {
Sint32 temp;
temp = min;
min = max;
max = temp;
min = pMax;
max = pMin;
} else if (pMin == pMax) {
return (Sint32)min;
}

range = (Sint64)max - (Sint64)min;
if (range < SDL_MAX_SINT32) {
return min + (Sint32) (SDLTest_RandomUint32() % (range + 1));
return (Sint32) (min + (Sint32) (SDLTest_RandomUint32() % (range + 1)));
} else {
Uint64 add = SDLTest_RandomUint32() | SDLTest_RandomUint32();
const Uint64 add = SDLTest_RandomUint32() | SDLTest_RandomUint32();
return (Sint32) (min + (Sint64) (add % (range + 1)));
}
}
Expand Down

0 comments on commit c9c991b

Please sign in to comment.