projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
all printf variants: fix argument type handling for %c and %lc
[musl]
/
src
/
stdio
/
vswprintf.c
diff --git
a/src/stdio/vswprintf.c
b/src/stdio/vswprintf.c
index
7f98c5c
..
fc223cf
100644
(file)
--- a/
src/stdio/vswprintf.c
+++ b/
src/stdio/vswprintf.c
@@
-18,6
+18,7
@@
static size_t sw_write(FILE *f, const unsigned char *s, size_t l)
if (s!=f->wbase && sw_write(f, f->wbase, f->wpos-f->wbase)==-1)
return -1;
while (c->l && l && (i=mbtowc(c->ws, (void *)s, l))>=0) {
+ if (!i) i=1;
s+=i;
l-=i;
c->l--;