diff options
Diffstat (limited to 'sam.c')
| -rw-r--r-- | sam.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1389,9 +1389,9 @@ static int extract(Vis *vis, Win *win, Command *cmd, const char *argv[], Selecti bool trailing_match = false; size_t start = range->start, end = range->end, last_start = EPOS; size_t nsub = 1 + text_regex_nsub(cmd->regex); - if (nsub > 10) - nsub = 10; - RegexMatch match[nsub]; + if (nsub > MAX_REGEX_SUB) + nsub = MAX_REGEX_SUB; + RegexMatch match[MAX_REGEX_SUB]; while (start < end || trailing_match) { trailing_match = false; char c; |
