{ .in = "no variables", .out = "no variables", .ret = 0 },
{ .in = "%{literal('hello')}", .out = "'hello'", .ret = 0 },
{ .in = "hello\\tworld", .out = "hello\\tworld", .ret = 0 },
+ { .in = "%%%%%%%%%%%%%%%%%%", .out = "%%%%%%%%%%%%%%%%%%", .ret = 0 },
{ .in = "%{literal('hello\r\n\tworld')}", .out = "'hello\r\n\tworld'", .ret = 0 },
/* Hello */
{ .in = "\\110\\145\\154\\154\\157", .out = "\\110\\145\\154\\154\\157", .ret = 0},
static void push_new_program(VAR_EXPAND_PARSER_STYPE *pstate)
{
- pstate->pp = pstate->p;
- pstate->p = NULL;
+ if (pstate->p != NULL) {
+ pstate->pp = pstate->p;
+ pstate->p = NULL;
+ }
}
/* Special optimization: If the previous program was also a literal, reuse it