summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/codegen.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2016-12-03 12:53:21 +0900
committerGitHub <[email protected]>2016-12-03 12:53:21 +0900
commit23c4ad08654c7a277edd1b56716012f361f044fa (patch)
tree9d77f1607ee2d7bac001ce36d7c17ec945aa8122 /mrbgems/mruby-compiler/core/codegen.c
parent79a621dd739faf4cc0958e11d6a887331cf79e48 (diff)
parentfe362c1f2649c9c502d9a5998ef8c4c94893f3ea (diff)
downloadmruby-23c4ad08654c7a277edd1b56716012f361f044fa.tar.gz
mruby-23c4ad08654c7a277edd1b56716012f361f044fa.zip
Merge pull request #3319 from bouk/apost-splatt
Fix segfault when using result of rest assignment
Diffstat (limited to 'mrbgems/mruby-compiler/core/codegen.c')
-rw-r--r--mrbgems/mruby-compiler/core/codegen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c
index 553baa116..2c75c8aed 100644
--- a/mrbgems/mruby-compiler/core/codegen.c
+++ b/mrbgems/mruby-compiler/core/codegen.c
@@ -1061,7 +1061,9 @@ gen_vmassignment(codegen_scope *s, node *tree, int rhs, int val)
n++;
}
}
- push();
+ if (!val) {
+ push();
+ }
}
}