Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed May 14, 2024
1 parent 0e8dd05 commit 84855c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/std/obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,11 @@ HL_PRIM hl_runtime_obj *hl_get_obj_rt( hl_type *ot ) {
if( ft->kind == HPACKED ) {
// align on packed largest field
int large = hl_get_obj_rt(ft->tparam)->largest_field;
if( large < HL_WSIZE ) large = HL_WSIZE;
int pad = size % large;
if( pad != 0 )
size += large - size;
if( large > largest_field )
largest_field = large;
} else
size += hl_pad_struct(size,ft);
t->fields_indexes[i+start] = size;
Expand Down

0 comments on commit 84855c0

Please sign in to comment.