]> granicus.if.org Git - mutt/commitdiff
Clear last search pattern if it's invalid. Closes #3315.
authorRocco Rutte <pdmef@gmx.net>
Fri, 14 Aug 2009 19:29:47 +0000 (21:29 +0200)
committerRocco Rutte <pdmef@gmx.net>
Fri, 14 Aug 2009 19:29:47 +0000 (21:29 +0200)
We keep both, the string version and compiled version around
for search-next; however, in case of parsing errors we dropped
only the compiled version and not the string one making the
code attempting to perform a search using a NULL pattern.

ChangeLog
pattern.c

index 292d809933d4861c74751bc11a38f1d3250f218c..3d60ed75dd16f6c8078119d922db91c548c192b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-08-14 02:44 +0200  Rocco Rutte  <pdmef@gmx.net>  (053ef7bbaa72)
+
+       * pattern.c: Bail on missing pattern modifiers at end of pattern.
+       Closes #3314.
+
+2009-08-13 23:49 +0200  Rocco Rutte  <pdmef@gmx.net>  (f8d50e968853)
+
+       * doc/Muttrc.head, doc/manual.xml.head, init.h: Docs: fix
+       typos/style
+
 2009-08-11 12:22 -0700  Tomas Hoger  <thoger@redhat.com>  (dc09812e63a3)
 
        * mutt_ssl.c: Catch SSL null prefix attach (openssl)
index 91814124336f6d89521cde67529a267b20dfb84e..9b5a656dee27b2b3ec46db1b70f6ded0891e8338 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -1436,8 +1436,9 @@ int mutt_search_command (int cur, int op)
       err.data = error;
       err.dsize = sizeof (error);
       if ((SearchPattern = mutt_pattern_comp (temp, M_FULL_MSG, &err)) == NULL)
-       {
+      {
        mutt_error ("%s", error);
+       LastSearch[0] = '\0';
        return (-1);
       }
       mutt_clear_error ();