diff options
author | Florian Westphal <fw@strlen.de> | 2018-04-19 18:18:57 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-04-19 21:17:49 +0200 |
commit | bdc77c63d5816fd50ac5a353f6a37d9b6a410b2c (patch) | |
tree | e34ea2fe7d95c95721718cd3d39f0eebb08bb6ca /src/evaluate.c | |
parent | 4787edad132c30ae0f6bb00135ae5d970b0ccb74 (diff) |
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 <david.fabian@bosson.cz>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/evaluate.c')
-rw-r--r-- | src/evaluate.c | 2 |
1 files changed, 2 insertions, 0 deletions
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: |