the regex parser handles the (undefined) case of an unexpected byte
following a backslash as a literal. however, instead of correctly
decoding a character, it was treating the byte value itself as a
character. this was not only semantically unjustified, but turned out
to be dangerous on archs where plain char is signed: bytes in the
range 252-255 alias the internal codes -4 through -1 used for special
types of literal nodes in the AST.
} else {
/* extension: accept unknown escaped char
as a literal */
- node = tre_ast_new_literal(ctx->mem, *s, *s, ctx->position);
+ goto parse_literal;
}
ctx->position++;
}