diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-07 03:40:15 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-07 03:40:15 +0000 |
commit | 5f0b1d4e7fd69248b5b73a2a2a30a45af5a96c9f (patch) | |
tree | 5aeee3e93b082070687c888d2e91fcce3658810f /pp.c | |
parent | c6601927a584c0fd18d5a6bb3b4c95cff46a2c6a (diff) | |
download | perl-5f0b1d4e7fd69248b5b73a2a2a30a45af5a96c9f.tar.gz |
[win32] fix C<print "foo ${\()}"> (pp_refgen fumbles when G_SCALAR, no args)
p4raw-id: //depot/win32/perl@916
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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) |