fix btowc corner case

btowc is required to interpret its argument by conversion to unsigned
char, unless the argument is equal to EOF. since the conversion to
produces a non-character value anyway, we can just unconditionally
convert, for now.
This commit is contained in:
Rich Felker
2015-06-16 04:21:38 +00:00
parent ee59c296d5
commit 38e2f72723
+1
View File
@@ -3,5 +3,6 @@
wint_t btowc(int c)
{
c = (unsigned char)c;
return c<128U ? c : EOF;
}