aboutsummaryrefslogtreecommitdiff
path: root/mail/mutt/files/patch-dgc-deepif
blob: 6ca74d71f4a380186480829e50d9281e542d66ae (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	2020-05-05 02:09:34 UTC
+++ muttlib.c
@@ -1710,6 +1710,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++;
 	}
@@ -1722,7 +1728,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;