projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add TLSDESC support for 32-bit arm
[musl]
/
src
/
stdio
/
vfwprintf.c
diff --git
a/src/stdio/vfwprintf.c
b/src/stdio/vfwprintf.c
index
e87ad42
..
0adf0b7
100644
(file)
--- a/
src/stdio/vfwprintf.c
+++ b/
src/stdio/vfwprintf.c
@@
-5,6
+5,7
@@
#include <string.h>
#include <stdarg.h>
#include <stddef.h>
#include <string.h>
#include <stdarg.h>
#include <stddef.h>
+#include <stdlib.h>
#include <wchar.h>
#include <inttypes.h>
#include <wchar.h>
#include <inttypes.h>
@@
-255,8
+256,11
@@
static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
}
continue;
case 'c':
}
continue;
case 'c':
+ if (w<1) w=1;
+ if (w>1 && !(fl&LEFT_ADJ)) fprintf(f, "%*s", w-1, "");
fputwc(btowc(arg.i), f);
fputwc(btowc(arg.i), f);
- l = 1;
+ if (w>1 && (fl&LEFT_ADJ)) fprintf(f, "%*s", w-1, "");
+ l = w;
continue;
case 'C':
fputwc(arg.i, f);
continue;
case 'C':
fputwc(arg.i, f);