diff options
author | Joe Orton <jorton@apache.org> | 2007-04-26 13:10:34 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2007-04-26 13:10:34 +0000 |
commit | 9c9da2e0a35a67e50aaaf37419ec0dc77d8b45fa (patch) | |
tree | 498c947055be8b5825850d1997a950c4273f8180 /strings | |
parent | fe21f4eebaea06db06cbfd2f40abdb4a33e890d0 (diff) | |
download | apr-9c9da2e0a35a67e50aaaf37419ec0dc77d8b45fa.tar.gz |
* strings/apr_snprintf.c (conv_10_quad): Fix formatting of unsigned
integers between 2^63 and 2^64 on 32-bit platforms.
* test/testfmt.c (more_int64_fmts): Test an even bigger unsigned
int64.
Submitted by: Wynn Wilkes <wynn bungeelabs.com>
PR: 42250
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@532733 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'strings')
-rw-r--r-- | strings/apr_snprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/apr_snprintf.c b/strings/apr_snprintf.c index 7ad741100..a8b5db593 100644 --- a/strings/apr_snprintf.c +++ b/strings/apr_snprintf.c @@ -397,7 +397,7 @@ static char *conv_10_quad(widest_int num, register bool_int is_unsigned, * number against the largest long value it can be. If <=, we * punt to the quicker version. */ - if ((num <= ULONG_MAX && is_unsigned) + if (((u_widest_int)num <= (u_widest_int)ULONG_MAX && is_unsigned) || (num <= LONG_MAX && num >= LONG_MIN && !is_unsigned)) return(conv_10( (wide_int)num, is_unsigned, is_negative, buf_end, len)); |