From: Doug MacEachern Date: Tue, 10 Jul 2001 11:19:43 +0000 (-0700) Subject: Re: [PATCH] Small fix to pp_gmtime X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=27d41816431d5c2af1a1968e40d64d3f7553e2fb;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] Small fix to pp_gmtime Message-ID: p4raw-id: //depot/perl@11266 --- diff --git a/pp_ctl.c b/pp_ctl.c index ca82350..1605e21 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1551,7 +1551,7 @@ PP(pp_caller) if (MAXARG) count = POPi; - EXTEND(SP, 10); + for (;;) { /* we may be in a higher stacklevel, so dig down deeper */ while (cxix < 0 && top_si->si_type != PERLSI_MAIN) { @@ -1560,8 +1560,10 @@ PP(pp_caller) cxix = dopoptosub_at(ccstack, top_si->si_cxix); } if (cxix < 0) { - if (GIMME != G_ARRAY) + if (GIMME != G_ARRAY) { + EXTEND(SP, 1); RETPUSHUNDEF; + } RETURN; } if (PL_DBsub && cxix >= 0 && @@ -1583,6 +1585,7 @@ PP(pp_caller) stashname = CopSTASHPV(cx->blk_oldcop); if (GIMME != G_ARRAY) { + EXTEND(SP, 1); if (!stashname) PUSHs(&PL_sv_undef); else { @@ -1593,6 +1596,8 @@ PP(pp_caller) RETURN; } + EXTEND(SP, 10); + if (!stashname) PUSHs(&PL_sv_undef); else