diff options
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 93fc5c62ef..cef2e6d9bf 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -43,6 +43,7 @@ /* #undef REGEXP_DEBUG */ /* #define REGEXP_DEBUG */ +#include <assert.h> #include <inttypes.h> #include <stdbool.h> #include <string.h> @@ -5625,6 +5626,8 @@ static int match_with_backref(linenr_T start_lnum, colnr_T start_col, linenr_T e /* Get the line to compare with. */ p = reg_getline(clnum); + assert(p); + if (clnum == end_lnum) len = end_col - ccol; else |