aboutsummaryrefslogtreecommitdiff
path: root/sam.c
diff options
context:
space:
mode:
Diffstat (limited to 'sam.c')
-rw-r--r--sam.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sam.c b/sam.c
index 5b4b636..0900c76 100644
--- a/sam.c
+++ b/sam.c
@@ -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;