mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-05 04:27:51 +00:00
Correct lb_emit_ptr_offset bug caused by LLVMConstGEP assuming a signed index
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user