diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-06-16 04:21:38 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-06-16 04:21:38 +0000 |
commit | 38e2f727237230300fea6aff68802db04625fd23 (patch) | |
tree | 9b4803220218d676302456ad93bb31dc521939dd /src/multibyte | |
parent | ee59c296d56bf26f49f354d6eb32b4b6d4190188 (diff) | |
download | musl-38e2f727237230300fea6aff68802db04625fd23.tar.gz musl-38e2f727237230300fea6aff68802db04625fd23.tar.bz2 musl-38e2f727237230300fea6aff68802db04625fd23.tar.xz musl-38e2f727237230300fea6aff68802db04625fd23.zip |
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.
Diffstat (limited to 'src/multibyte')
-rw-r--r-- | src/multibyte/btowc.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |