diff options
author | Robert Spier <rspier@pobox.com> | 2001-03-08 22:30:20 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-09 15:01:27 +0000 |
commit | 62815d3c8d96cc000ba7b7782a9f95afd54ffe44 (patch) | |
tree | db36505ed66520a5fe2a14fcbabb5119ff9e8cb5 /hv.c | |
parent | ad52c9ebd1217cdd30d8a5568b46bfab6236a484 (diff) | |
download | perl-62815d3c8d96cc000ba7b7782a9f95afd54ffe44.tar.gz |
Re: [ID 19990808.001] [PATCH] FETCH triggered on exists()
Message-ID: <15016.38044.381174.160189@rls.cx>
EXISTS() returning undef mistakenly triggered a FETCH().
p4raw-id: //depot/perl@9090
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -927,11 +927,12 @@ Perl_hv_exists_ent(pTHX_ HV *hv, SV *keysv, U32 hash) if (SvRMAGICAL(hv)) { if (mg_find((SV*)hv,'P')) { + SV* svret = sv_newmortal(); sv = sv_newmortal(); keysv = sv_2mortal(newSVsv(keysv)); mg_copy((SV*)hv, sv, (char*)keysv, HEf_SVKEY); - magic_existspack(sv, mg_find(sv, 'p')); - return SvTRUE(sv); + magic_existspack(svret, mg_find(sv, 'p')); + return SvTRUE(svret); } #ifdef ENV_IS_CASELESS else if (mg_find((SV*)hv,'E')) { |