# HG changeset patch # User Bram Moolenaar # Date 1379851044 -7200 # Node ID 71e92a1cb37db719d6406858a50ca3bdfc9881fb # Parent 53cd90707ec6b581f2e22d22acf262afdd42ba5e updated for version 7.4.032 Problem: NFA engine does not match the NUL character. (Jonathon Merz) Solution: Ues 0x0a instead of NUL. (Christian Brabandt) diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -1383,8 +1383,9 @@ nfa_regatom() EMSG2_RET_FAIL( _("E678: Invalid character after %s%%[dxouU]"), reg_magic == MAGIC_ALL); + /* A NUL is stored in the text as NL */ /* TODO: what if a composing character follows? */ - EMIT(nr); + EMIT(nr == 0 ? 0x0a : nr); } break; diff --git a/src/testdir/test64.in b/src/testdir/test64.in --- a/src/testdir/test64.in +++ b/src/testdir/test64.in @@ -373,6 +373,7 @@ STARTTEST :call add(tl, [2, '\%x20', 'yes no', ' ']) :call add(tl, [2, '\%u0020', 'yes no', ' ']) :call add(tl, [2, '\%U00000020', 'yes no', ' ']) +:call add(tl, [2, '\%d0', "yes\x0ano", "\x0a"]) :" :""""" \%[abc] :call add(tl, [2, 'foo\%[bar]', 'fobar']) diff --git a/src/testdir/test64.ok b/src/testdir/test64.ok --- a/src/testdir/test64.ok +++ b/src/testdir/test64.ok @@ -863,6 +863,9 @@ OK 2 - \%u0020 OK 0 - \%U00000020 OK 1 - \%U00000020 OK 2 - \%U00000020 +OK 0 - \%d0 +OK 1 - \%d0 +OK 2 - \%d0 OK 0 - foo\%[bar] OK 1 - foo\%[bar] OK 2 - foo\%[bar] diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -739,6 +739,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 32, +/**/ 31, /**/ 30,