gingerBill 7 years ago
parent
commit
57b97ad0bd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/ir.cpp

+ 1 - 1
src/ir.cpp

@@ -5457,7 +5457,7 @@ irAddr ir_build_addr(irProcedure *proc, AstNode *expr) {
 		Type *type = base_type(ir_type(base));
 
 		if (is_type_pointer(type)) {
-			type = type_deref(type);
+			type = base_type(type_deref(type));
 			addr = base;
 			base = ir_emit_load(proc, base);
 		}