From dbbd7ac6ac9c40a91fcef6ca588ad215ed8eefe9 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 24 Apr 2015 12:43:17 +0100 Subject: [PATCH] vfprintf: use int not short for va_arg This is needed on 6809, but should be correct for the general case. --- Library/libs/vfprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/libs/vfprintf.c b/Library/libs/vfprintf.c index 40680e24..11dcc5d6 100644 --- a/Library/libs/vfprintf.c +++ b/Library/libs/vfprintf.c @@ -151,7 +151,7 @@ int _vfnprintf(FILE * op, size_t maxlen, const char *fmt, va_list ap) case 'i': ptmp = __ltostr((long) ((lval) ? va_arg(ap, long) : - va_arg(ap, short)), 10); + va_arg(ap, int)), 10); goto printit; case 'b': /* Unsigned binary */ @@ -180,7 +180,7 @@ int _vfnprintf(FILE * op, size_t maxlen, const char *fmt, va_list ap) case 'u': /* Unsigned decimal */ usproc: val = lval ? va_arg(ap, unsigned long) : - va_arg(ap, unsigned short); + va_arg(ap, unsigned int); ptmp = __ultostr(val, radix < 0 ? -radix : radix); add = ""; if (hash) { -- 2.34.1