summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/rcore.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rcore.c b/src/rcore.c
index e1fcd0de..12fe7351 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -2824,9 +2824,10 @@ int GetRandomValue(int min, int max)
max = min;
min = tmp;
}
+
if ((unsigned int)(max - min) > (unsigned int)RAND_MAX)
{
- TRACELOG(LOG_WARNING, "Invalid GetRandomValue arguments. Range should not be higher than %i.", RAND_MAX);
+ TRACELOG(LOG_WARNING, "Invalid GetRandomValue() arguments, range should not be higher than %i", RAND_MAX);
}
return (rand()%(abs(max - min) + 1) + min);