From 3b19f20311a3ef45c6ee7d5a4575cedb1d4cbaa5 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Wed, 16 Feb 2000 01:38:52 +0000 Subject: [PATCH] (PARSE_INT_FORMAT): note that shorts are actually transmitted as ints (according to the integer protomotion rules) in variable arguments lists. Therefore, we should not call va_arg with short but rather with int. See for original bug report git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7950 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/snprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/roken/snprintf.c b/lib/roken/snprintf.c index da8820247..4a60b4620 100644 --- a/lib/roken/snprintf.c +++ b/lib/roken/snprintf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995-1997, 1999 Kungliga Tekniska Högskolan + * Copyright (c) 1995-2000 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -265,7 +265,7 @@ append_char(struct state *state, if (long_flag) \ res = (unsig long)va_arg(arg, unsig long); \ else if (short_flag) \ - res = (unsig short)va_arg(arg, unsig short); \ + res = (unsig short)va_arg(arg, unsig int); \ else \ res = (unsig int)va_arg(arg, unsig int)