add more tests; allow \< escape out

This commit is contained in:
Kyryl Melekhin
2021-10-21 18:45:19 +00:00
parent 91e630abe9
commit 2d96c352cc
2 changed files with 44 additions and 0 deletions

2
pike.c
View File

@@ -203,6 +203,8 @@ static int _compilecode(const char **re_loc, rcode *prog, int sizecode)
re++;
if (!*re) goto syntax_error; // Trailing backslash
if (*re == '<' || *re == '>') {
if (re - *re_loc > 2 && re[-2] == '\\')
break;
EMIT(PC++, *re == '<' ? WBEG : WEND);
prog->len++;
term = PC;