summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-10-30 11:29:50 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-10-30 11:29:50 +0000
commitd724f706d60f9fb8d712cd22b9ec95e343d5ee28 (patch)
tree832cd909e9cd7f3b05047a8e307ecbba2f8f6203
parenta45c7426c93f17067d1734c68cb400246e1db490 (diff)
downloadperl-d724f706d60f9fb8d712cd22b9ec95e343d5ee28.tar.gz
The file test operators -s, -A, -C and -M can return false values
that are not undef or "no". Take that into account when stacking them. This fixes bug #60214. p4raw-id: //depot/perl@34660
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 0181e7eea4..6bc84d9def 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2940,7 +2940,7 @@ PP(pp_stat)
* Else, discard it from the stack and continue. --rgs
*/
#define STACKED_FTEST_CHECK if (PL_op->op_private & OPpFT_STACKED) { \
- if (TOPs == &PL_sv_no || TOPs == &PL_sv_undef) { RETURN; } \
+ if (!SvTRUE(TOPs)) { RETURN; } \
else { (void)POPs; PUTBACK; } \
}