X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;ds=sidebyside;f=indirect.xs;h=aa2e69198efcc9caf25dabb40ad9f88ef969a3d2;hb=7f756d0f409eb87eb7900dafdb81428e4367021b;hp=2d02563f3fe1f437801d0a3887a699a2d05ee3ab;hpb=1e73136219e28f80e67999f68c801588afb512a9;p=perl%2Fmodules%2Findirect.git diff --git a/indirect.xs b/indirect.xs index 2d02563..aa2e691 100644 --- a/indirect.xs +++ b/indirect.xs @@ -192,13 +192,15 @@ STATIC OP *indirect_ck_entersub(pTHX_ OP *o) { if (hint) { const char *pm, *po; SV *svm, *svo; - op = (LISTOP *) o; - while (op->op_type != OP_PUSHMARK) - op = (LISTOP *) op->op_first; - oo = op->op_sibling; - om = oo; - while (om->op_sibling) - om = om->op_sibling; + oo = o; + do { + op = (LISTOP *) oo; + if (!op->op_flags & OPf_KIDS) + goto done; + oo = op->op_first; + } while (oo->op_type != OP_PUSHMARK); + oo = oo->op_sibling; + om = op->op_last; if (om->op_type == OP_METHOD) om = cUNOPx(om)->op_first; else if (om->op_type != OP_METHOD_NAMED)