aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-02-18 10:37:56 +0100
committerGitHub <noreply@github.com>2019-02-18 10:37:56 +0100
commit9cf600e702872ddae83c222d0a389f809879a212 (patch)
treed0913718fedb02a64bb88c1c9db90895631a53f5 /src/nvim/regexp.c
parent6b827bb6646c213b8ad5ee6c1c87dcfd84f4bc29 (diff)
parent486234ab3db56621767bea18a1783d289b660764 (diff)
downloadrneovim-9cf600e702872ddae83c222d0a389f809879a212.tar.gz
rneovim-9cf600e702872ddae83c222d0a389f809879a212.tar.bz2
rneovim-9cf600e702872ddae83c222d0a389f809879a212.zip
Merge #9625 from janlazo/vim-8.1.0945
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index a70b150e9b..53479294de 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -772,7 +772,7 @@ static int get_equi_class(char_u **pp)
int l = 1;
char_u *p = *pp;
- if (p[1] == '=') {
+ if (p[1] == '=' && p[2] != NUL) {
l = (*mb_ptr2len)(p + 2);
if (p[l + 2] == '=' && p[l + 3] == ']') {
c = utf_ptr2char(p + 2);
@@ -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);