[git commit branch/0.9.33] stdio: Fix char signedness in _load_inttype()

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Apr 3 17:38:45 UTC 2012


commit: http://git.uclibc.org/uClibc/commit/?id=5d7ee2fe0f12c5eb81361303a6bf03b597909237
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0.9.33

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/stdio/_load_inttype.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libc/stdio/_load_inttype.c b/libc/stdio/_load_inttype.c
index 057f5f2..dabb6af 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


More information about the uClibc-cvs mailing list