Commit bd4911a6 authored by Thomas Roessler's avatar Thomas Roessler

Fix #87s; from Brendan Cully.

parent 7c130846
......@@ -415,8 +415,13 @@ hdr_format_str (char *dest,
break;
case 'E':
snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
snprintf (dest, destlen, fmt, mutt_messages_in_thread(ctx, hdr, 0));
if (!optional)
{
snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
snprintf (dest, destlen, fmt, mutt_messages_in_thread(ctx, hdr, 0));
}
else if (mutt_messages_in_thread(ctx, hdr, 0) <= 1)
optional = 0;
break;
case 'f':
......
......@@ -908,6 +908,7 @@ void mutt_FormatString (char *dest, /* output buffer */
char ifstring[SHORT_STRING], elsestring[SHORT_STRING];
size_t wlen, count, len;
prefix[0] = '\0';
destlen--; /* save room for the terminal \0 */
wlen = (flags & M_FORMAT_ARROWCURSOR && option (OPTARROWCURSOR)) ? 3 : 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment