aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-09-18 15:12:12 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-09-18 15:12:12 -0300
commite80d7c0df7ec6e88a964e58d86a70c8f980e4cc1 (patch)
tree0037b05c1a27aaaf31c038a32f3a64100a8f3ccf /src/nvim/search.c
parenta4c41735359d0114e678cbf4888c514f604f01dd (diff)
parente897ccad3eb1eb8d423766300be9c6055fcd1d9f (diff)
downloadrneovim-e80d7c0df7ec6e88a964e58d86a70c8f980e4cc1.tar.gz
rneovim-e80d7c0df7ec6e88a964e58d86a70c8f980e4cc1.tar.bz2
rneovim-e80d7c0df7ec6e88a964e58d86a70c8f980e4cc1.zip
Merge PR #3309 'Fixes for 0.1'
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,