This resolves same issue as previous patch when such
expression is used as a set key:
set z {
typeof ct zone
- elements = { 1, 512, 768, 1024, 1280, 1536 }
+ elements = { 1, 2, 3, 4, 5, 6 }
}
Signed-off-by: Florian Westphal <fw@strlen.de>
{
struct expr *elem = *expr;
- if (ctx->set && __expr_evaluate_set_elem(ctx, elem) < 0)
- return -1;
+ if (ctx->set) {
+ const struct expr *key;
+
+ if (__expr_evaluate_set_elem(ctx, elem) < 0)
+ return -1;
+
+ key = ctx->set->key;
+ __expr_set_context(&ctx->ectx, key->dtype, key->byteorder, key->len, 0);
+ }
if (expr_evaluate(ctx, &elem->key) < 0)
return -1;