diff src/regexp_nfa.c @ 5360:71e92a1cb37d v7.4.032

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)
author Bram Moolenaar <bram@vim.org>
date Sun, 22 Sep 2013 13:57:24 +0200
parents 923738744a60
children 90e2f0729a0d
line wrap: on
line diff
--- 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;