summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2009-12-07 13:41:05 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2009-12-07 13:41:05 +0100
commit69c3dccf5322a59cb855347c04712ba11b65328f (patch)
tree6e844945249bc28fdbb94058aae7b541aa493cd4 /pp_ctl.c
parent289281205c65de071383bf72b5d8aef3c17f427b (diff)
downloadperl-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index e69107e874..68a42d7cc6 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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,