aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_const.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/llvm_backend_const.cpp')
-rw-r--r--src/llvm_backend_const.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp
index 413fb365b..554255f47 100644
--- a/src/llvm_backend_const.cpp
+++ b/src/llvm_backend_const.cpp
@@ -527,7 +527,7 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
i64 total_elem_count = matrix_type_total_elems(type);
LLVMValueRef *elems = gb_alloc_array(permanent_allocator(), LLVMValueRef, cast(isize)total_elem_count);
for (i64 i = 0; i < row; i++) {
- elems[matrix_index_to_offset(type, i)] = single_elem.value;
+ elems[matrix_indices_to_offset(type, i, i)] = single_elem.value;
}
for (i64 i = 0; i < total_elem_count; i++) {
if (elems[i] == nullptr) {