Skip to content

Commit 5b65e76

Browse files
committed
fix lvar_state dump size
`ibf_dump_write()` should consider the size of the element.
1 parent 479cdab commit 5b65e76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13272,7 +13272,7 @@ ibf_dump_lvar_states(struct ibf_dump *dump, const rb_iseq_t *iseq)
1327213272
const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq);
1327313273
const int size = body->local_table_size;
1327413274
IBF_W_ALIGN(enum lvar_state);
13275-
return ibf_dump_write(dump, body->lvar_states, body->lvar_states ? size : 0);
13275+
return ibf_dump_write(dump, body->lvar_states, sizeof(enum lvar_state) * (body->lvar_states ? size : 0));
1327613276
}
1327713277

1327813278
static enum lvar_state *

0 commit comments

Comments
 (0)