drop the old string API fully.
[apps/madmutt.git] / pattern.c
index 66d8290..d388924 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -816,7 +816,7 @@ pattern_t *mutt_pattern_comp ( /* const */ char *s, int flags, BUFFER * err)
         return NULL;
       }
       /* compile the sub-expression */
         return NULL;
       }
       /* compile the sub-expression */
-      buf = str_substrdup (ps.dptr + 1, p);
+      buf = p_dupstr(ps.dptr + 1, p - ps.dptr - 1);
       if ((tmp = mutt_pattern_comp (buf, flags, err)) == NULL) {
         p_delete(&buf);
         mutt_pattern_free (&curlist);
       if ((tmp = mutt_pattern_comp (buf, flags, err)) == NULL) {
         p_delete(&buf);
         mutt_pattern_free (&curlist);