diff options
author | Kevin McCarthy <kevin@8t8.us> | 2019-04-08 19:51:01 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2019-04-09 14:06:39 -0700 |
commit | 5d491c1b15614325f01a8c74f2ac054858d7904b (patch) | |
tree | 6a376cd288e3ba1209768fa1f9363ed552731552 /color.c | |
parent | 8aad07e5ca1826a1de7cca9a51356dab84dba9c4 (diff) |
Convert mutt_check_simple() to accept a BUFFER parameter.
Diffstat (limited to 'color.c')
-rw-r--r-- | color.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -582,14 +582,17 @@ add_pattern (COLOR_LINE **top, const char *s, int sensitive, else { int r; - char buf[LONG_STRING]; + BUFFER *buf = NULL; tmp = mutt_new_color_line (); if (is_index) { - strfcpy(buf, NONULL(s), sizeof(buf)); - mutt_check_simple (buf, sizeof (buf), NONULL(SimpleSearch)); - if ((tmp->color_pattern = mutt_pattern_comp (buf, MUTT_FULL_MSG, err)) == NULL) + buf = mutt_buffer_pool_get (); + mutt_buffer_strcpy(buf, NONULL(s)); + mutt_check_simple (buf, NONULL(SimpleSearch)); + tmp->color_pattern = mutt_pattern_comp (buf->data, MUTT_FULL_MSG, err); + mutt_buffer_pool_release (&buf); + if (tmp->color_pattern == NULL) { mutt_free_color_line(&tmp, 1); return -1; |