Commit 0dd5e0eb authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

restore arena_idx after reading irep

parent d8cd21be
......@@ -502,6 +502,7 @@ mrb_read_irep(mrb_state *mrb, const char *bin)
uint32_t len = 0;
unsigned char *src;
rite_binary_header bin_header;
int ai = mrb->arena_idx;
if ((mrb == NULL) || (bin == NULL)) {
return MRB_DUMP_INVALID_ARGUMENT;
......@@ -539,6 +540,7 @@ mrb_read_irep(mrb_state *mrb, const char *bin)
mrb->irep_len += nirep;
error_exit:
mrb->arena_idx = ai;
if (ret != MRB_DUMP_OK) {
for (n=0,i=sirep; n<nirep; n++,i++) {
if (mrb->irep[i]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment