Support printf %n directive

This commit is contained in:
Justine Tunney 2024-07-28 22:27:06 -07:00
parent c1a0b017e9
commit 01b09bc817
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
8 changed files with 21 additions and 8 deletions

View file

@ -63,7 +63,7 @@ int vdprintf(int fd, const char *fmt, va_list va) {
t.n = 0;
t.t = 0;
t.fd = fd;
if (__fmt(vdprintf_putc, &t, fmt, va) == -1)
if (__fmt(vdprintf_putc, &t, fmt, va, &t.t) == -1)
return -1;
if (t.n) {
iov[0].iov_base = t.b;