diff src/regexp_nfa.c @ 4760:532a9855bd30 v7.3.1127

updated for version 7.3.1127 Problem: No error for using empty \%[]. Solution: Give error message.
author Bram Moolenaar <bram@vim.org>
date Wed, 05 Jun 2013 21:30:37 +0200
parents b25a1b2e3175
children 47906f888725
line wrap: on
line diff
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -977,6 +977,9 @@ nfa_regatom()
 						      reg_magic == MAGIC_ALL);
 			    EMIT(c);
 			}
+			if (n == 0)
+			    EMSG2_RET_FAIL(_(e_empty_sb),
+						      reg_magic == MAGIC_ALL);
 			EMIT(NFA_OPT_CHARS);
 			EMIT(n);
 			break;