aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-10-15 23:30:55 +0100
committergingerBill <bill@gingerbill.org>2017-10-15 23:30:55 +0100
commit57b97ad0bd9fe74115611bb8a365cb00552d702b (patch)
tree69d9ffd72c293de257de3e88299fe809c83542a6 /src
parent56f7a859dfdb990aa480a4fac8c0f48b15e6b90c (diff)
Fix issue #124
Diffstat (limited to 'src')
-rw-r--r--src/ir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 75efd919e..9e67cd952 100644
--- a/src/ir.cpp
+++ b/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);
}