diff options
author | Rafael Garcia-Suarez <rgs@consttype.org> | 2009-12-07 13:41:05 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2009-12-07 13:41:05 +0100 |
commit | 69c3dccf5322a59cb855347c04712ba11b65328f (patch) | |
tree | 6e844945249bc28fdbb94058aae7b541aa493cd4 /pp_ctl.c | |
parent | 289281205c65de071383bf72b5d8aef3c17f427b (diff) | |
download | perl-69c3dccf5322a59cb855347c04712ba11b65328f.tar.gz |
Fix [perl #71078] Smart match against @_ gives false negatives
@_ can contain NULLs for undefined elements
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4321,7 +4321,8 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other) SV * const * const other_elem = av_fetch(other_av, i, FALSE); if (!this_elem || !other_elem) { - if (this_elem || other_elem) + if ((this_elem && SvOK(*this_elem)) + || (other_elem && SvOK(*other_elem))) RETPUSHNO; } else if (hv_exists_ent(seen_this, |