diff options
author | Steve Price <steve@FreeBSD.org> | 1997-08-23 23:51:12 +0000 |
---|---|---|
committer | Steve Price <steve@FreeBSD.org> | 1997-08-23 23:51:12 +0000 |
commit | a89989b26f18285a92fb372157c8af79987599cb (patch) | |
tree | 85440e92192d3448c582b82f6138460f7df74108 /lib/libc/stdlib/strtoq.c | |
parent | 1e915c361efb9201ff291318b8554609bd940035 (diff) |
Notes
Diffstat (limited to 'lib/libc/stdlib/strtoq.c')
-rw-r--r-- | lib/libc/stdlib/strtoq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdlib/strtoq.c b/lib/libc/stdlib/strtoq.c index 26667496f32d..f84e030531bb 100644 --- a/lib/libc/stdlib/strtoq.c +++ b/lib/libc/stdlib/strtoq.c @@ -105,7 +105,7 @@ strtoq(nptr, endptr, base) * overflow. */ qbase = (unsigned)base; - cutoff = neg ? -(u_quad_t)QUAD_MIN : QUAD_MAX; + cutoff = neg ? (u_quad_t)-(QUAD_MIN + QUAD_MAX) + QUAD_MAX : QUAD_MAX; cutlim = cutoff % qbase; cutoff /= qbase; for (acc = 0, any = 0;; c = *s++) { |