From: Yves Orton Date: Mon, 8 Jan 2007 20:31:26 +0000 (+0100) Subject: Change #29711 broke tr//c on Win32. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10db182f300d7d02627f42e12a36e35eb69d6b00;p=p5sagit%2Fp5-mst-13.2.git Change #29711 broke tr//c on Win32. Message-ID: <9b18b3110701081131v392597c6veed493407c1eede7@mail.gmail.com> p4raw-id: //depot/perl@29731 --- diff --git a/op.c b/op.c index df2e90b..1f7e13d 100644 --- 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];