return err;
}
-static int expr_evaluate_concat(struct eval_ctx *ctx, struct expr **expr)
+static int expr_evaluate_concat(struct eval_ctx *ctx, struct expr **expr,
+ bool eval)
{
const struct datatype *dtype = ctx->ectx.dtype, *tmp;
uint32_t type = dtype ? dtype->type : 0, ntype = 0;
tmp = concat_subtype_lookup(type, --off);
expr_set_context(&ctx->ectx, tmp, tmp->size);
- if (list_member_evaluate(ctx, &i) < 0)
+ if (eval && list_member_evaluate(ctx, &i) < 0)
return -1;
flags &= i->flags;
case EXPR_BINOP:
return expr_evaluate_binop(ctx, expr);
case EXPR_CONCAT:
- return expr_evaluate_concat(ctx, expr);
+ return expr_evaluate_concat(ctx, expr, true);
case EXPR_LIST:
return expr_evaluate_list(ctx, expr);
case EXPR_SET:
if (set->key->len == 0) {
if (set->key->ops->type == EXPR_CONCAT &&
- expr_evaluate_concat(ctx, &set->key) < 0)
+ expr_evaluate_concat(ctx, &set->key, false) < 0)
return -1;
if (set->key->len == 0)