Skip to content

Commit

Permalink
Fix core dump bug with anoncode
Browse files Browse the repository at this point in the history
  • Loading branch information
Chip Salzenberg committed Dec 19, 1996
1 parent ff3ff8d commit 178c630
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions op.c
Expand Up @@ -3384,8 +3384,16 @@ OP *
ck_anoncode(op)
OP *op;
{
PADOFFSET ix = pad_alloc(op->op_type, SVs_PADMY);
av_store(comppad_name, ix, newSVpv("&", 1));
PADOFFSET ix;
SV* name;

name = NEWSV(1106,0);
sv_upgrade(name, SVt_PVNV);
sv_setpvn(name, "&", 1);
SvIVX(name) = -1;
SvNVX(name) = 1;
ix = pad_alloc(op->op_type, SVs_PADMY);
av_store(comppad_name, ix, name);
av_store(comppad, ix, cSVOP->op_sv);
SvPADMY_on(cSVOP->op_sv);
cSVOP->op_sv = Nullsv;
Expand Down

0 comments on commit 178c630

Please sign in to comment.