X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=op.c;h=71d0764c229519ce7eff5df4929dcb022a566f7b;hb=b1fbf5c3d1dc6dd7934002da04dede2ae2e3ef65;hp=9f9136173cc28e8089c5515696ccc430379149c8;hpb=bc61e32505856a259efd811252c6a97691a0b3e3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/op.c b/op.c index 9f91361..71d0764 100644 --- a/op.c +++ b/op.c @@ -4237,10 +4237,10 @@ Perl_newLOOPOP(pTHX_ I32 flags, I32 debuggable, OP *expr, OP *block) break; case OP_SASSIGN: - if (k1->op_type == OP_READDIR + if (k1 && (k1->op_type == OP_READDIR || k1->op_type == OP_GLOB || (k1->op_type == OP_NULL && k1->op_targ == OP_GLOB) - || k1->op_type == OP_EACH) + || k1->op_type == OP_EACH)) expr = newUNOP(OP_DEFINED, 0, expr); break; } @@ -4299,10 +4299,10 @@ whileline, OP *expr, OP *block, OP *cont, I32 has_my) break; case OP_SASSIGN: - if (k1->op_type == OP_READDIR + if (k1 && (k1->op_type == OP_READDIR || k1->op_type == OP_GLOB || (k1->op_type == OP_NULL && k1->op_targ == OP_GLOB) - || k1->op_type == OP_EACH) + || k1->op_type == OP_EACH)) expr = newUNOP(OP_DEFINED, 0, expr); break; } @@ -4607,7 +4607,7 @@ S_newGIVWHENOP(pTHX_ OP *cond, OP *block, */ STATIC bool -S_looks_like_bool(pTHX_ OP *o) +S_looks_like_bool(pTHX_ const OP *o) { dVAR; switch(o->op_type) { @@ -4678,7 +4678,7 @@ Perl_newGIVENOP(pTHX_ OP *cond, OP *block, PADOFFSET defsv_off) OP * Perl_newWHENOP(pTHX_ OP *cond, OP *block) { - bool cond_llb = (!cond || looks_like_bool(cond)); + const bool cond_llb = (!cond || looks_like_bool(cond)); OP *cond_op; if (cond_llb)