diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-06-08 10:36:43 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-06-08 10:36:43 -0400 |
commit | 63d40196b91df8937424cfa4495e8991c5a20827 (patch) | |
tree | 51d7018d267b21085f4b65b8d0d20bea7d9d69a6 | |
parent | 6e9ff6a4cf4c6ab8f18e35934e33579c4caf2c3e (diff) | |
download | musl-63d40196b91df8937424cfa4495e8991c5a20827.tar.gz musl-63d40196b91df8937424cfa4495e8991c5a20827.tar.bz2 musl-63d40196b91df8937424cfa4495e8991c5a20827.tar.xz musl-63d40196b91df8937424cfa4495e8991c5a20827.zip |
fix %ls breakage in last printf fix
signedness issue kept %ls with no precision from working at all
-rw-r--r-- | src/stdio/vfprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index d593b330..481436df 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -599,12 +599,12 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, p = -1; case 'S': ws = arg.p; - for (i=l=0; i<p && *ws && (l=wctomb(mb, *ws++))>=0 && l<=0U+p-i; i+=l); + for (i=l=0; i<0U+p && *ws && (l=wctomb(mb, *ws++))>=0 && l<=0U+p-i; i+=l); if (l<0) return -1; p = i; pad(f, ' ', w, p, fl); ws = arg.p; - for (i=0; i<p && *ws && i+(l=wctomb(mb, *ws++))<=p; i+=l) + for (i=0; i<0U+p && *ws && i+(l=wctomb(mb, *ws++))<=p; i+=l) out(f, mb, l); pad(f, ' ', w, p, fl^LEFT_ADJ); l = w>p ? w : p; |