소스 검색

stdio: Fix char signedness in _load_inttype()

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 12 년 전
부모
커밋
238f52fdab
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      libc/stdio/_load_inttype.c

+ 1 - 1
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