aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c2
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(&regmatch,
win, buf, lnum + matchpos.lnum,
matchcol,