From 7e14ed1360c65b78c3ad1fc4fafea13e30067478 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 26 Sep 2011 18:56:56 -0400 Subject: fix ctype macros to cast argument to (unsigned) first issue reported by nsz, but it's actually not just pedantic. the functions can take input of any arithmetic type, including floating point, and the behavior needs to be as if the conversion implicit in the function call took place. --- include/wctype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/wctype.h') diff --git a/include/wctype.h b/include/wctype.h index af9be069..3a5af6e7 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -36,7 +36,7 @@ wctrans_t wctrans(const char *); wctype_t wctype(const char *); #undef iswdigit -#define iswdigit(a) ((unsigned)((a)-L'0') < 10) +#define iswdigit(a) (((unsigned)(a)-L'0') < 10) #ifdef __cplusplus } -- cgit v1.2.1