Merge pull request #3318 from bouk/splat-stack

Fix stack move segfaulting in OP_ARYCAT
This commit is contained in:
Yukihiro "Matz" Matsumoto
2016-12-05 16:51:46 +09:00
committed by GitHub
+2 -2
View File
@@ -2161,8 +2161,8 @@ RETRY_TRY_BLOCK:
CASE(OP_ARYCAT) {
/* A B mrb_ary_concat(R(A),R(B)) */
mrb_ary_concat(mrb, regs[GETARG_A(i)],
mrb_ary_splat(mrb, regs[GETARG_B(i)]));
mrb_value splat = mrb_ary_splat(mrb, regs[GETARG_B(i)]);
mrb_ary_concat(mrb, regs[GETARG_A(i)], splat);
ARENA_RESTORE(mrb, ai);
NEXT;
}