diff --git a/tools/qfcc/source/emit.c b/tools/qfcc/source/emit.c index 1cc97f947..238bee41b 100644 --- a/tools/qfcc/source/emit.c +++ b/tools/qfcc/source/emit.c @@ -342,13 +342,13 @@ emit_move_expr (expr_t *e) if (dst_type->type == ev_struct && src_type->type == ev_struct) { size_expr = new_short_expr (type_size (dst->type)); } else if (dst_type->type == ev_struct) { - //if (dst->alias) - // dst = dst->alias; + if (dst->alias) + dst = dst->alias; dst = emit_sub_expr (address_expr (new_def_expr (dst), 0, 0), 0); size_expr = new_integer_expr (type_size (dst_type)); } else if (src_type->type == ev_struct) { - //if (src->alias) - // src = src->alias; + if (src->alias) + src = src->alias; src = emit_sub_expr (address_expr (new_def_expr (src), 0, 0), 0); size_expr = new_integer_expr (type_size (dst_type->aux_type)); } else { diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index 3b59cab69..864095afa 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -2097,7 +2097,7 @@ address_expr (expr_t *e1, expr_t *e2, type_t *t) e->e.pointer.val = 0; e->e.pointer.type = t; e->e.pointer.def = def; - } else if (type->type == ev_array) { + } else if (type->type == ev_array || type->type == ev_void) { e = e1; e->type = ex_pointer; e->e.pointer.val = 0;