chiark
/
gitweb
/
~mdw
/
mLib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
09fbf4d
)
struct/dstr-putf.c: Don't segfault on `*' width/precision indicators.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 14 Jun 2014 23:24:48 +0000
(
00:24
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 14 Jun 2014 23:24:48 +0000
(
00:24
+0100)
Must have always been broken. Strange: I thought I'd tested that.
struct/dstr-putf.c
patch
|
blob
|
blame
|
history
diff --git
a/struct/dstr-putf.c
b/struct/dstr-putf.c
index 38eb8f6d1c1580c921220b6ecab7184a3df2b348..ba715b19dd334aaead31ca59053ef0df497edcf3 100644
(file)
--- 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);