From e744e21a5aa1e4e5820999ac1e6776fa8fe76dd8 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 15 Jun 2014 00:24:48 +0100 Subject: [PATCH] struct/dstr-putf.c: Don't segfault on `*' width/precision indicators. Must have always been broken. Strange: I thought I'd tested that. --- struct/dstr-putf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/struct/dstr-putf.c b/struct/dstr-putf.c index 38eb8f6..ba715b1 100644 --- a/struct/dstr-putf.c +++ b/struct/dstr-putf.c @@ -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); -- 2.11.0