Skip to content

Commit

Permalink
Fixed access of uninitialized C local variable; fix #3525
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Mar 18, 2017
1 parent b2916f1 commit 00427d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
else {
mrb_value blk = regs[bidx];
if (!mrb_nil_p(blk) && mrb_type(blk) != MRB_TT_PROC) {
ci->nregs = bidx+1;
mrb->c->ci->nregs = bidx+1;
regs[bidx] = mrb_convert_type(mrb, blk, MRB_TT_PROC, "Proc", "to_proc");
}
}
Expand Down

0 comments on commit 00427d4

Please sign in to comment.