From d1a7fa67b08dbd30781192e423fa671807a1d870 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 27 Jun 2022 09:16:54 +0000 Subject: [PATCH] Tweak previous - find end of style correctly. --- usr.bin/tmux/format.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index a5054d22747..664a217156a 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.306 2022/06/27 09:14:49 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.307 2022/06/27 09:16:54 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -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 */ -- 2.20.1