diff --git a/libc/stdlib/strtol.cpp b/libc/stdlib/strtol.cpp index e7662ef8..9a9c8008 100644 --- a/libc/stdlib/strtol.cpp +++ b/libc/stdlib/strtol.cpp @@ -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; }