From 38e2f727237230300fea6aff68802db04625fd23 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 16 Jun 2015 04:21:38 +0000 Subject: 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. --- src/multibyte/btowc.c | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.1