simplify mutt_parse_date
[apps/madmutt.git] / lib-lib / buffer.c
index 6b46380..47e58ba 100644 (file)
@@ -259,7 +259,7 @@ int mutt_extract_token(BUFFER *dest, BUFFER *tok, int flags)
             if (*tok->dptr == '{') {
                 tok->dptr++;
                 if ((pc = strchr (tok->dptr, '}'))) {
-                    var = str_substrdup (tok->dptr, pc);
+                    var = p_dupstr(tok->dptr, pc - tok->dptr);
                     tok->dptr = pc + 1;
                 }
             } else {