summaryrefslogtreecommitdiffstats
path: root/src/regexp_bt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regexp_bt.c')
-rw-r--r--src/regexp_bt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/regexp_bt.c b/src/regexp_bt.c
index 18bad80548..698ff043ea 100644
--- a/src/regexp_bt.c
+++ b/src/regexp_bt.c
@@ -1503,6 +1503,14 @@ regatom(int *flagp)
break;
case '#':
+ if (regparse[0] == '=' && regparse[1] >= 48
+ && regparse[1] <= 50)
+ {
+ // misplaced \%#=1
+ semsg(_(e_atom_engine_must_be_at_start_of_pattern),
+ regparse[1]);
+ return FAIL;
+ }
ret = regnode(CURSOR);
break;