Change #29711 broke tr//c on Win32.
Yves Orton [Mon, 8 Jan 2007 20:31:26 +0000 (21:31 +0100)]
Message-ID: <9b18b3110701081131v392597c6veed493407c1eede7@mail.gmail.com>

p4raw-id: //depot/perl@29731

op.c

diff --git a/op.c b/op.c
index df2e90b..1f7e13d 100644 (file)
--- a/op.c
+++ b/op.c
@@ -3078,9 +3078,11 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
            }
            else if (j >= (I32)rlen)
                j = rlen - 1;
-           else
-               cPVOPo->op_pv = (char*)PerlMemShared_realloc(tbl,
+           else {
+               tbl = PerlMemShared_realloc(tbl,
                                        (0x101+rlen-j) * sizeof(short));
+               cPVOPo->op_pv = (char*)tbl;
+           }
            tbl[0x100] = (short)(rlen - j);
            for (i=0; i < (I32)rlen - j; i++)
                tbl[0x101+i] = r[j+i];