summaryrefslogtreecommitdiff
path: root/pp.h
diff options
context:
space:
mode:
Diffstat (limited to 'pp.h')
-rw-r--r--pp.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp.h b/pp.h
index 9d078af5e5..c36502a03f 100644
--- a/pp.h
+++ b/pp.h
@@ -474,7 +474,8 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
#define tryAMAGICftest(chr) \
STMT_START { \
assert(chr != '?'); \
- if (SvAMAGIC(TOPs)) { \
+ if ((PL_op->op_flags & OPf_KIDS) \
+ && SvAMAGIC(TOPs)) { \
const char tmpchr = (chr); \
SV * const tmpsv = amagic_call(TOPs, \
newSVpvn_flags(&tmpchr, 1, SVs_TEMP), \