[warnings] fix integer narrowing

This commit is contained in:
akallabeth 2024-10-03 13:15:25 +02:00
parent cdb25ea11b
commit efeac25fa9
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

@ -429,7 +429,7 @@ static int rdtk_font_parse_descriptor_buffer(rdtkFont* font, uint8_t* buffer, si
*q = '\0';
errno = 0;
{
long val = strtoul(p, NULL, 0);
long val = strtol(p, NULL, 0);
if ((errno != 0) || (val < INT32_MIN) || (val > INT32_MAX))
return -1;