Skip to content

Commit

Permalink
updated for version 7.4.032
Browse files Browse the repository at this point in the history
Problem:    NFA engine does not match the NUL character. (Jonathon Merz)
Solution:   Ues 0x0a instead of NUL. (Christian Brabandt)
  • Loading branch information
brammool committed Sep 22, 2013
1 parent 00462ff commit 595cad2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/regexp_nfa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/testdir/test64.in
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
3 changes: 3 additions & 0 deletions src/testdir/test64.ok
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
32,
/**/
31,
/**/
Expand Down

0 comments on commit 595cad2

Please sign in to comment.