From: Nicholas Clark Date: Mon, 24 Nov 2003 20:07:29 +0000 (+0000) Subject: Should fix the infinite loop on a dynamic %ENV fetch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0ed299501d408b6e22065c36966752a861574a3d;p=p5sagit%2Fp5-mst-13.2.git Should fix the infinite loop on a dynamic %ENV fetch p4raw-id: //depot/perl@21782 --- diff --git a/hv.c b/hv.c index a39fdcd..39684b0 100644 --- a/hv.c +++ b/hv.c @@ -682,7 +682,8 @@ S_hv_fetch_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, return entry; } #ifdef DYNAMIC_ENV_FETCH /* %ENV lookup? If so, try to fetch the value now */ - if (SvRMAGICAL((SV*)hv) && mg_find((SV*)hv, PERL_MAGIC_env)) { + if (!(action & HV_FETCH_ISSTORE) + && SvRMAGICAL((SV*)hv) && mg_find((SV*)hv, PERL_MAGIC_env)) { unsigned long len; char *env = PerlEnv_ENVgetenv_len(key,&len); if (env) {