From: Rich Felker Date: Tue, 16 Jun 2015 04:21:38 +0000 (+0000) Subject: fix btowc corner case X-Git-Tag: v1.1.11~41 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=38e2f727237230300fea6aff68802db04625fd23;p=oweals%2Fmusl.git 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. --- diff --git a/src/multibyte/btowc.c b/src/multibyte/btowc.c index 9d2c3b16..29cb798d 100644 --- a/src/multibyte/btowc.c +++ b/src/multibyte/btowc.c @@ -3,5 +3,6 @@ wint_t btowc(int c) { + c = (unsigned char)c; return c<128U ? c : EOF; }