mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
restore arena_idx after reading irep
This commit is contained in:
@@ -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]) {
|
||||
|
||||
Reference in New Issue
Block a user