Skip to content

Commit 0bb207d

Browse files
committed
updates
1 parent 0916f50 commit 0bb207d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/array.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ JL_DLLEXPORT jl_value_t *jl_arrayref(jl_array_t *a, size_t i)
502502
el_type = jl_nth_union_component(el_type, sel);
503503
if (jl_is_datatype_singleton((jl_datatype_t*)el_type))
504504
return ((jl_datatype_t*)el_type)->instance;
505+
elt = jl_new_bits(el_type, &((char*)a->data)[i*(a->elsize-1)]);
505506
}
506507
elt = jl_new_bits(el_type, &((char*)a->data)[i*a->elsize]);
507508
}
@@ -570,6 +571,8 @@ JL_DLLEXPORT void jl_arrayset(jl_array_t *a, jl_value_t *rhs, size_t i)
570571
*psel = nth;
571572
if (jl_is_datatype_singleton((jl_datatype_t*)el_type))
572573
return;
574+
jl_assign_bits(&((char*)a->data)[i*(a->elsize-1)], rhs);
575+
return;
573576
}
574577
jl_assign_bits(&((char*)a->data)[i*a->elsize], rhs);
575578
}

0 commit comments

Comments
 (0)