From 238f52fdab1f18577c7aaa749f4f24118403926f Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 28 Mar 2012 09:44:53 +0200 Subject: stdio: Fix char signedness in _load_inttype() Signed-off-by: Bernhard Reutner-Fischer --- libc/stdio/_load_inttype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/stdio') diff --git a/libc/stdio/_load_inttype.c b/libc/stdio/_load_inttype.c index 057f5f256..dabb6afa6 100644 --- a/libc/stdio/_load_inttype.c +++ b/libc/stdio/_load_inttype.c @@ -57,7 +57,7 @@ uintmax_t _load_inttype(int desttype, register const void *src, int uflag) { int x; x = *((int *) src); - if (desttype == __PA_FLAG_CHAR) x = (char) x; + if (desttype == __PA_FLAG_CHAR) x = (signed char) x; #if SHRT_MAX != INT_MAX if (desttype == PA_FLAG_SHORT) x = (short int) x; #endif -- cgit v1.2.3