Minor tweak

This commit is contained in:
Ray 2022-12-18 18:00:21 +01:00
parent d7f7c94c4d
commit 03cc540d5f

View File

@ -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);