Skip to content

Commit 5a3f03d

Browse files
committed
updates
1 parent 8429d78 commit 5a3f03d

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
@@ -478,6 +478,7 @@ JL_DLLEXPORT jl_value_t *jl_arrayref(jl_array_t *a, size_t i)
478478
el_type = jl_nth_union_component(el_type, sel);
479479
if (jl_is_datatype_singleton((jl_datatype_t*)el_type))
480480
return ((jl_datatype_t*)el_type)->instance;
481+
elt = jl_new_bits(el_type, &((char*)a->data)[i*(a->elsize-1)]);
481482
}
482483
elt = jl_new_bits(el_type, &((char*)a->data)[i*a->elsize]);
483484
}
@@ -546,6 +547,8 @@ JL_DLLEXPORT void jl_arrayset(jl_array_t *a, jl_value_t *rhs, size_t i)
546547
*psel = nth;
547548
if (jl_is_datatype_singleton((jl_datatype_t*)el_type))
548549
return;
550+
jl_assign_bits(&((char*)a->data)[i*(a->elsize-1)], rhs);
551+
return;
549552
}
550553
jl_assign_bits(&((char*)a->data)[i*a->elsize], rhs);
551554
}

0 commit comments

Comments
 (0)