mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +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) {
|
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};
|
LLVMValueRef indices[1] = {index.value};
|
||||||
lbValue res = {};
|
lbValue res = {};
|
||||||
res.type = ptr.type;
|
res.type = ptr.type;
|
||||||
|
|||||||
Reference in New Issue
Block a user