diff --git a/lang/cem/libcc.ansi/stdlib/strtol.c b/lang/cem/libcc.ansi/stdlib/strtol.c index 152af9303..da040ab1a 100644 --- a/lang/cem/libcc.ansi/stdlib/strtol.c +++ b/lang/cem/libcc.ansi/stdlib/strtol.c @@ -80,7 +80,7 @@ string2long(register const char *nptr, char ** const endptr, * unsigned long. */ if (is_signed - && ( (sign < 0 && val > -LONG_MIN) + && ( (sign < 0 && val > -(LONG_MIN+1)+(unsigned long) 1) || (sign > 0 && val > LONG_MAX))) ovfl++; }