From: Gurusamy Sarathy Date: Thu, 7 May 1998 03:40:15 +0000 (+0000) Subject: [win32] fix C (pp_refgen fumbles when G_SCALAR, no args) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f0b1d4e7fd69248b5b73a2a2a30a45af5a96c9f;p=p5sagit%2Fp5-mst-13.2.git [win32] fix C (pp_refgen fumbles when G_SCALAR, no args) p4raw-id: //depot/win32/perl@916 --- diff --git a/pp.c b/pp.c index 3dc5a72..7d9b529 100644 --- a/pp.c +++ b/pp.c @@ -442,8 +442,13 @@ PP(pp_refgen) { djSP; dMARK; if (GIMME != G_ARRAY) { - MARK[1] = *SP; - SP = MARK + 1; + if (++MARK <= SP) + *MARK = *SP; + else + *MARK = &sv_undef; + *MARK = refto(*MARK); + SP = MARK; + RETURN; } EXTEND_MORTAL(SP - MARK); while (++MARK <= SP)