patch 8.2.4978: no error if engine selection atom is not at the start

Problem:    No error if engine selection atom is not at the start.
Solution:   Give an error. (Christian Brabandt, closes #10439)
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 2c79a49..511b904 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -1592,6 +1592,14 @@
 		    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;
+		    }
 		    EMIT(NFA_CURSOR);
 		    break;