projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee59c29
)
fix btowc corner case
author
Rich Felker
<dalias@aerifal.cx>
Tue, 16 Jun 2015 04:21:38 +0000
(
04:21
+0000)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 16 Jun 2015 04:21:38 +0000
(
04:21
+0000)
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
patch
|
blob
|
history
diff --git
a/src/multibyte/btowc.c
b/src/multibyte/btowc.c
index 9d2c3b16eb77a4e6df82c31bb4c56d517424a533..29cb798d2ce2a25cf2eb4e8b5079b80ebfe523a4 100644
(file)
--- 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;
}