summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/codegen.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2016-11-23 21:08:35 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2016-11-23 21:08:35 +0900
commit669bbc70b0553b68483c8d7eff8c31a602f283e9 (patch)
tree40703789ea7e2d50f24cd3f8b98b5dd2022fc3b6 /mrbgems/mruby-compiler/core/codegen.c
parentbfbc6b9ea48355785c236826e3a1a217b668aee2 (diff)
downloadmruby-669bbc70b0553b68483c8d7eff8c31a602f283e9.tar.gz
mruby-669bbc70b0553b68483c8d7eff8c31a602f283e9.zip
codegen_scope should not keep old iseq ptr from irep
Diffstat (limited to 'mrbgems/mruby-compiler/core/codegen.c')
-rw-r--r--mrbgems/mruby-compiler/core/codegen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c
index 9b064b867..85ca21dd4 100644
--- a/mrbgems/mruby-compiler/core/codegen.c
+++ b/mrbgems/mruby-compiler/core/codegen.c
@@ -2713,7 +2713,7 @@ scope_new(mrb_state *mrb, codegen_scope *prev, node *lv)
p->icapa = 1024;
p->iseq = (mrb_code*)mrb_malloc(mrb, sizeof(mrb_code)*p->icapa);
- p->irep->iseq = p->iseq;
+ p->irep->iseq = NULL;
p->pcapa = 32;
p->irep->pool = (mrb_value*)mrb_malloc(mrb, sizeof(mrb_value)*p->pcapa);