Change from Larry in the MAD code which seems to be unrelated to MAD.
Nicholas Clark [Wed, 8 Mar 2006 18:17:09 +0000 (18:17 +0000)]
p4raw-id: //depot/perl@27423

op.c

diff --git a/op.c b/op.c
index ae5c6a8..08e053a 100644 (file)
--- a/op.c
+++ b/op.c
@@ -3561,7 +3561,9 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp)
 
     scalarboolean(first);
     /* optimize "!a && b" to "a || b", and "!a || b" to "a && b" */
-    if (first->op_type == OP_NOT && (first->op_flags & OPf_SPECIAL)) {
+    if (first->op_type == OP_NOT
+       && (first->op_flags & OPf_SPECIAL)
+       && (first->op_flags & OPf_KIDS)) {
        if (type == OP_AND || type == OP_OR) {
            if (type == OP_AND)
                type = OP_OR;