aboutsummaryrefslogtreecommitdiffstats
path: root/snprintf.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>1998-11-08 00:05:45 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>1998-11-08 00:05:45 +0000
commitb8db68155f20ad420ccd3d31821bb79da7e89e7f (patch)
tree2acf37013a5462db7e9cd957f842b0b5339cebaf /snprintf.c
parent521c021411b4d25fa96df95645e38e08862580df (diff)
* Fix for unsigned overflows on Solaris
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@81 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'snprintf.c')
-rw-r--r--snprintf.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/snprintf.c b/snprintf.c
index 64ade9d517..8224051888 100644
--- a/snprintf.c
+++ b/snprintf.c
@@ -553,7 +553,15 @@ va_list args;
exponent(&data, d);
state = 0;
break;
- case 'u':
+ case 'u': /* unsigned decimal */
+ STAR_ARGS(&data);
+ if (data.a_long == FOUND)
+ d = va_arg(args, unsigned long);
+ else
+ d = va_arg(args, unsigned int);
+ decimal(&data, d);
+ state = 0;
+ break;
case 'd': /* decimal */
STAR_ARGS(&data);
if (data.a_long == FOUND)