summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2015-02-13 12:26:50 +0000
committerHugo van der Sanden <hv@crypt.org>2015-02-16 03:14:06 +0000
commit87ebf1e3df9537a204b21f0405c6e60f2acdcc47 (patch)
tree3917d6e76e3eb769a80087f9f38e5e3af0f0935c /op.c
parente47d32dcd59a578274f445fac79e977d83055c8c (diff)
downloadperl-87ebf1e3df9537a204b21f0405c6e60f2acdcc47.tar.gz
[perl #123816] fix stat stacking
The check function for filetests avoids treating '-t stat' as a pair of stackable filetests, but needs also to avoid treating 'stat -t' as stackable.
Diffstat (limited to 'op.c')
-rw-r--r--op.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/op.c b/op.c
index dea09cf9b3..2a76ae4198 100644
--- a/op.c
+++ b/op.c
@@ -9876,8 +9876,10 @@ Perl_ck_ftst(pTHX_ OP *o)
}
if ((PL_hints & HINT_FILETEST_ACCESS) && OP_IS_FILETEST_ACCESS(o->op_type))
o->op_private |= OPpFT_ACCESS;
- if (PL_check[kidtype] == Perl_ck_ftst
- && kidtype != OP_STAT && kidtype != OP_LSTAT) {
+ if (type != OP_STAT && type != OP_LSTAT
+ && PL_check[kidtype] == Perl_ck_ftst
+ && kidtype != OP_STAT && kidtype != OP_LSTAT
+ ) {
o->op_private |= OPpFT_STACKED;
kid->op_private |= OPpFT_STACKING;
if (kidtype == OP_FTTTY && (