1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Fix strtol multiplication overflow check.

This commit is contained in:
Jonas 'Sortie' Termansen 2015-02-11 17:35:28 +01:00
parent 0096eb82a3
commit 60f85af7c4

View file

@ -100,7 +100,7 @@ static bool would_multiplication_overflow(T_INT a, T_INT b)
// unsigned integer case.
if ( T_INT_IS_UNSIGNED )
{
T_INT max_b = a / T_INT_MAX;
T_INT max_b = T_INT_MAX / a;
return max_b < b;
}