diff options
| author | Koichi Sasada <ko1@atdot.net> | 2025-09-24 07:10:31 +0900 |
|---|---|---|
| committer | Koichi Sasada <ko1@atdot.net> | 2025-09-24 10:51:02 +0900 |
| commit | 5b65e76a7d3aa5d6111fbf2b5bf371bdf478c352 (patch) | |
| tree | aae2cddeb5accd976f6a5ed9e97dfa863fe6697b | |
| parent | 479cdab3378a9597b01a4a3febc382488484f21a (diff) | |
fix lvar_state dump size
`ibf_dump_write()` should consider the size of the element.
| -rw-r--r-- | compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -13272,7 +13272,7 @@ ibf_dump_lvar_states(struct ibf_dump *dump, const rb_iseq_t *iseq) const struct rb_iseq_constant_body *const body = ISEQ_BODY(iseq); const int size = body->local_table_size; IBF_W_ALIGN(enum lvar_state); - return ibf_dump_write(dump, body->lvar_states, body->lvar_states ? size : 0); + return ibf_dump_write(dump, body->lvar_states, sizeof(enum lvar_state) * (body->lvar_states ? size : 0)); } static enum lvar_state * |
