summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2003-05-07 08:27:07 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2003-05-08 18:12:46 +0000
commit126c71c82576d5dc652db25ca9e3f8e18442c4fd (patch)
treee2790a78faaa94be96e8fcce8035cddddae1602e /pp_hot.c
parent86e5a81e88dbe10bf1c195d6ca6fefab8bfafc17 (diff)
downloadperl-126c71c82576d5dc652db25ca9e3f8e18442c4fd.tar.gz
Re: [perl #17718] %tiedhash in bool context doesn't check if hash is empty
Message-ID: <7gYu+gzkgaFU092yn@efn.org> p4raw-id: //depot/perl@19452
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index d907570e4c..416eba5fd1 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -795,6 +795,7 @@ PP(pp_rv2hv)
{
dSP; dTOPss;
HV *hv;
+ I32 gimme = GIMME_V;
if (SvROK(sv)) {
wasref:
@@ -808,7 +809,7 @@ PP(pp_rv2hv)
RETURN;
}
else if (LVRET) {
- if (GIMME == G_SCALAR)
+ if (GIMME != G_SCALAR)
Perl_croak(aTHX_ "Can't return hash to lvalue scalar context");
SETs((SV*)hv);
RETURN;