commit 046864593b34da99c4e2538754519533e279b677
parent 7482051e238d19ba5028c1b09860c459291eca85
Author: Drew DeVault <sir@cmpwn.com>
Date: Tue, 23 Feb 2021 14:58:07 -0500
check: fix issues with tag selection in propagate
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/check.c b/src/check.c
@@ -1578,7 +1578,7 @@ check_expr_propagate(struct context *ctx,
struct type_tagged_union return_tagged = {0};
struct type_tagged_union *rtagged = &return_tagged,
- **next_rtag = &tagged->next;
+ **next_rtag = &rtagged->next;
const struct type_tagged_union *intu = &type_dealias(intype)->tagged;
for (; intu; intu = intu->next) {
@@ -1586,7 +1586,7 @@ check_expr_propagate(struct context *ctx,
if (rtagged->type) {
rtagged = *next_rtag =
xcalloc(1, sizeof(struct type_tagged_union));
- next_rtag = &tagged->next;
+ next_rtag = &rtagged->next;
rtagged->type = intu->type;
} else {
rtagged->type = intu->type;