From eb3593b38b7b6b658e93ad05d6caf76d58cc0c35 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 22 Apr 2006 22:33:57 +0000 Subject: updated for version 7.0e06 --- src/regexp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/regexp.c') diff --git a/src/regexp.c b/src/regexp.c index e0bfb0305..2cd3120c6 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -7054,7 +7054,7 @@ reg_submatch(no) int round; linenr_T lnum; - if (!can_f_submatch) + if (!can_f_submatch || no < 0) return NULL; if (submatch_match == NULL) @@ -7112,10 +7112,10 @@ reg_submatch(no) ++len; } - if (round == 1) + if (retval == NULL) { retval = lalloc((long_u)len, TRUE); - if (s == NULL) + if (retval == NULL) return NULL; } } -- cgit v1.2.1