diff options
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r-- | src/nvim/search.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index ff5c5f834f..a758e02105 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -653,7 +653,7 @@ int searchit( } if (matchcol == 0 && (options & SEARCH_START)) break; - if (ptr[matchcol] == NUL + if (STRLEN(ptr) <= (size_t)matchcol || ptr[matchcol] == NUL || (nmatched = vim_regexec_multi(®match, win, buf, lnum + matchpos.lnum, matchcol, |