With Damian's approval synchronize damian's modules'
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index 421dc9e..64914ea 100644 (file)
--- a/op.c
+++ b/op.c
@@ -2872,11 +2872,8 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
                }
            }
        }
-       if (!del) {
-           if (j >= rlen)
-               j = rlen - 1;
-           else
-               cPVOPo->op_pv = (char*)Renew(tbl, 0x101+rlen-j, short);
+       if (!del && rlen >= j) {
+           cPVOPo->op_pv = (char*)Renew(tbl, 0x101+rlen-j, short);
            tbl[0x100] = rlen - j;
            for (i=0; i < rlen - j; i++)
                tbl[0x101+i] = r[j+i];