diff options
| author | gingerBill <bill@gingerbill.org> | 2021-12-29 15:01:56 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-12-29 15:01:56 +0000 |
| commit | ed742846cb6447d9d9ff6a4cfde285d7f4bb0eb9 (patch) | |
| tree | 1dff114935127038419b8103bc121db719a04191 /src | |
| parent | ed8b20da787edd3747cc85708a0b9dd2c2e256d1 (diff) | |
Correct `lb_emit_ptr_offset` bug caused by `LLVMConstGEP` assuming a signed index
Diffstat (limited to 'src')
| -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 0350f7287..3fe96459f 100644 --- a/src/llvm_backend_utility.cpp +++ b/src/llvm_backend_utility.cpp @@ -1200,7 +1200,7 @@ lbValue lb_emit_array_epi(lbProcedure *p, lbValue s, isize index) { } lbValue lb_emit_ptr_offset(lbProcedure *p, lbValue ptr, lbValue index) { - index = lb_correct_endianness(p, index); + index = lb_emit_conv(p, index, t_int); LLVMValueRef indices[1] = {index.value}; lbValue res = {}; res.type = ptr.type; |