chiark / gitweb /
struct/dstr-putf.c: Don't segfault on `*' width/precision indicators.
[mLib] / struct / dstr-putf.c
index 38eb8f6d1c1580c921220b6ecab7184a3df2b348..ba715b19dd334aaead31ca59053ef0df497edcf3 100644 (file)
@@ -151,6 +151,7 @@ int dstr_vputf(dstr *d, const char *p, va_list *ap)
            *ip = va_arg(*ap, int);
            DENSURE(&dd, DSTR_PUTFSTEP);
            dd.len += sprintf(dd.buf + dd.len, "%i", *ip);
+           p++;
          } else {
            *ip = *p - '0';
            DPUTC(&dd, *p);