aboutsummaryrefslogtreecommitdiff
path: root/mail/mutt/files/patch-dgc-deepif
blob: 94aa781974a17659a47e946de103f1d6861e21b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- muttlib.c.orig	2019-12-06 03:41:57 UTC
+++ muttlib.c
@@ -1606,6 +1606,12 @@ void mutt_FormatString (char *dest,		/* output buffer 
 	count = 0;
         while (count < sizeof (ifstring) && *src && *src != '?' && *src != '&')
 	{
+	  if (*src == '\\')
+	  {
+	    src++;
+	    if (!*src)
+	      break;
+	  }
           *cp++ = *src++;
 	  count++;
 	}
@@ -1618,7 +1624,13 @@ void mutt_FormatString (char *dest,		/* output buffer 
 	count = 0;
 	while (count < sizeof (elsestring) && *src && *src != '?')
 	{
-	  *cp++ = *src++;
+	  if (*src == '\\')
+	  {
+	    src++;
+	    if (!*src)
+	      break;
+	  }
+          *cp++ = *src++;
 	  count++;
 	}
 	*cp = 0;