From bdc77c63d5816fd50ac5a353f6a37d9b6a410b2c Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 19 Apr 2018 18:18:57 +0200 Subject: evaluate: clear expression context before cmd evaluation We also need to clear expr ctx before we eval a command. This is a followup fix to 'evaluate: reset eval context when evaluating set definitions'. The first patch only fixed set evaluation when dealing with a complete table representation rather than individual commands. Reported-by: David Fabian Signed-off-by: Florian Westphal --- src/evaluate.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/evaluate.c') diff --git a/src/evaluate.c b/src/evaluate.c index aee5b1c1..265a73fe 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -3472,6 +3472,8 @@ int cmd_evaluate(struct eval_ctx *ctx, struct cmd *cmd) erec_destroy(erec); } + memset(&ctx->ectx, 0, sizeof(ctx->ectx)); + ctx->cmd = cmd; switch (cmd->op) { case CMD_ADD: -- cgit v1.2.3