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.
This commit is contained in:
Rich Felker 2011-09-26 18:56:56 -04:00
commit 7e14ed1360
2 changed files with 7 additions and 7 deletions

View file

@ -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
}