diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-12-15 23:07:13 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-12-15 23:07:13 +0900 |
| commit | a3d240c2edb86671cea3e5b46987739fd9484fd6 (patch) | |
| tree | 8cd957831c7b0967aaf1a143536d07b9fe9da936 /src/load.c | |
| parent | f5e10c5a79a17939af763b1dcf5232ce47e24a34 (diff) | |
| parent | fa33a5bb0cf08a5ba7405ab1553655bcfabee8cf (diff) | |
| download | mruby-a3d240c2edb86671cea3e5b46987739fd9484fd6.tar.gz mruby-a3d240c2edb86671cea3e5b46987739fd9484fd6.zip | |
Merge pull request #5599 from dearblue/loss-digits
Avoid losing the upper digits for mruby binary
Diffstat (limited to 'src/load.c')
| -rw-r--r-- | src/load.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/load.c b/src/load.c index 2d1ec507e..9b8ffa384 100644 --- a/src/load.c +++ b/src/load.c @@ -85,15 +85,15 @@ read_irep_record_1(mrb_state *mrb, const uint8_t *bin, size_t *len, uint8_t flag src += sizeof(uint16_t); /* number of child irep */ - irep->rlen = (uint8_t)bin_to_uint16(src); + irep->rlen = bin_to_uint16(src); src += sizeof(uint16_t); /* Binary Data Section */ /* ISEQ BLOCK (and CATCH HANDLER TABLE BLOCK) */ irep->clen = bin_to_uint16(src); /* number of catch handler */ src += sizeof(uint16_t); - irep->ilen = bin_to_uint16(src); - src += sizeof(uint16_t); + irep->ilen = bin_to_uint32(src); + src += sizeof(uint32_t); if (irep->ilen > 0) { size_t data_len = sizeof(mrb_code) * irep->ilen + |
