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:
parent
0096eb82a3
commit
60f85af7c4
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue