diff options
Diffstat (limited to 'src/llvm_backend_utility.cpp')
| -rw-r--r-- | src/llvm_backend_utility.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_backend_utility.cpp b/src/llvm_backend_utility.cpp index ce7b43321..35e69a1be 100644 --- a/src/llvm_backend_utility.cpp +++ b/src/llvm_backend_utility.cpp @@ -1285,7 +1285,7 @@ lbValue lb_emit_ptr_offset(lbProcedure *p, lbValue ptr, lbValue index) { LLVMValueRef indices[1] = {index.value}; lbValue res = {}; res.type = ptr.type; - LLVMTypeRef type = lb_type(p->module, type_deref(ptr.type)); + LLVMTypeRef type = lb_type(p->module, type_deref(res.type, true)); if (lb_is_const(ptr) && lb_is_const(index)) { res.value = LLVMConstGEP2(type, ptr.value, indices, 1); |