Change returntype of random to size_t

This commit is contained in:
LibretroAdmin 2025-01-20 23:59:09 +01:00
parent f55d028ae5
commit 1ecd83b0ab
1 changed files with 6 additions and 6 deletions

View File

@ -196,9 +196,9 @@ static INLINE void convert_yxy_to_rgb(const float* Yxy, float* rgb)
*
* @return unsigned random value between \c min and \c max (inclusive).
*/
static INLINE unsigned random_range(unsigned min, unsigned max)
static INLINE size_t random_range(unsigned min, unsigned max)
{
return (min == max) ? min : (unsigned)((float)rand() / (float)RAND_MAX * (max + 1 - min) + min);
return (min == max) ? min : (size_t)((float)rand() / (float)RAND_MAX * (max + 1 - min) + min);
}
#endif