summaryrefslogtreecommitdiffstats
path: root/format.c
diff options
context:
space:
mode:
authornicm <nicm>2022-06-27 09:16:54 +0000
committernicm <nicm>2022-06-27 09:16:54 +0000
commitb22edcf3a5e6271625141992c1a842d295c8b89f (patch)
tree608edb0237995c81fbbfc9f88b3113b438f90dbd /format.c
parent786cff8db9dd64ec8143a492c63051582ee41288 (diff)
Tweak previous - find end of style correctly.
Diffstat (limited to 'format.c')
-rw-r--r--format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/format.c b/format.c
index e10f324f..b97c842c 100644
--- a/format.c
+++ b/format.c
@@ -4714,6 +4714,7 @@ format_expand1(struct format_expand_state *es, const char *fmt)
n++;
}
if (*ptr == '[') {
+ style_end = format_skip(fmt - 2, "]");
format_log(es, "found #*%zu[", n);
while (len - off < n + 2) {
buf = xreallocarray(buf, 2, len);
@@ -4722,7 +4723,6 @@ format_expand1(struct format_expand_state *es, const char *fmt)
memcpy(buf + off, fmt - 2, n + 1);
off += n + 1;
fmt = ptr + 1;
- style_end = format_skip(fmt - 2, "]");
continue;
}
/* FALLTHROUGH */