commit cefb2f150fc64a1a0b536d31db937803ec565c52
parent d5845af7f65f881a400b55dce59181d7a7bd2bd2
Author: Drew DeVault <sir@cmpwn.com>
Date: Fri, 15 Jan 2021 14:10:20 -0500
gen: fix issue with non-aggregate type tags
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gen.c b/src/gen.c
@@ -679,7 +679,7 @@ gen_cast_to_tagged(struct gen_context *ctx,
pushi(ctx->current, NULL, Q_STOREL, &tag, &ptr, NULL);
pushi(ctx->current, &ptr, Q_ADD, &ptr, &offs, NULL);
ptr.type = qtype_for_type(ctx, expr->result, false);
- ptr.indirect = type_is_aggregate(expr->cast.value->result);
+ ptr.indirect = !type_is_aggregate(expr->cast.value->result);
gen_expression(ctx, expr->cast.value, &ptr);
}