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
1 changed files with 1 additions and 1 deletions

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;
}