aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index b7fc39fdb3..53479294de 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -1103,7 +1103,7 @@ static int get_coll_element(char_u **pp)
int l = 1;
char_u *p = *pp;
- if (p[0] != NUL && p[1] == '.') {
+ if (p[0] != NUL && p[1] == '.' && p[2] != NUL) {
l = utfc_ptr2len(p + 2);
if (p[l + 2] == '.' && p[l + 3] == ']') {
c = utf_ptr2char(p + 2);