From 20ef089b4ec53352aaa3b733874ed65fab39c3b2 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Thu, 29 Jun 2017 14:40:19 +0100 Subject: [PATCH] dupe-string, don't destroy original --- muttlib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/muttlib.c b/muttlib.c index 8def1da06..ff5f9ac4a 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1308,6 +1308,10 @@ void mutt_FormatString(char *dest, /* output buffer */ int n; char *recycler = NULL; + char src2[STRING]; + strfcpy(src2, src, mutt_strlen(src) + 1); + src = src2; + prefix[0] = '\0'; destlen--; /* save room for the terminal \0 */ wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option(OPTARROWCURSOR)) ? 3 : 0; -- 2.49.0