summaryrefslogtreecommitdiff
path: root/copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'copy.c')
-rw-r--r--copy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/copy.c b/copy.c
index 3e2e720..ed05534 100644
--- a/copy.c
+++ b/copy.c
@@ -441,7 +441,9 @@ static void copy_stmt(Copier *c, Statement *out, Statement *in) {
case STMT_CONT:
break;
case STMT_USE:
- out->use = copy_expr_(c, in->use);
+ out->use = copier_malloc(c, sizeof *in->use);
+ *out->use = *in->use;
+ copy_expr(c, &out->use->expr, &in->use->expr);
break;
}
}