From: Rocco Rutte Date: Thu, 11 Oct 2007 09:03:42 +0000 (+0200) Subject: Do not consider empty pipes for filtering in format strings. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8bc2bcfc7c050cb5b788fde86477d9cf23ea6d6d;p=neomutt Do not consider empty pipes for filtering in format strings. This fixes a crash with $indent_string="|" and $text_flowed unset. --- diff --git a/ChangeLog b/ChangeLog index 33993d68d..32b70c6ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-09-28 11:06 +0200 Rocco Rutte (709db707bcdf) + + * curs_lib.c, muttlib.c, protos.h: Make mutt_FormatString()'s string + truncation multibyte aware + +2007-09-19 12:22 +0200 Rocco Rutte (c768a1ebf78a) + + * ChangeLog, menu.c: Enlarge buffers for printing menu entries from + STRING to LONG_STRING. Now that multibyte padding works, we may too + soon run into too short buffers for common terminal widths in + graphical terminals. + 2007-09-19 11:53 +0200 Rocco Rutte (5bc3cb8c8b68) * compose.c: Use mutt_paddstr() to print compose menu's status line diff --git a/muttlib.c b/muttlib.c index 2b7be974a..d1aba78ee 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1016,7 +1016,7 @@ void mutt_FormatString (char *dest, /* output buffer */ /* Do not consider filters if no pipe at end */ n = mutt_strlen(src); - if (n > 0 && src[n-1] == '|') + if (n > 1 && src[n-1] == '|') { /* Scan backwards for backslashes */ off = n;