diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-03 19:19:42 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-03 19:19:42 +0000 |
commit | 8973db79328a885c91b9dfdcafdb28dbe9e65a88 (patch) | |
tree | d6d992600192764a3ae09df1bb2d021e39a2f95e /op.c | |
parent | 830ec763789df5f5b0683aa3c9e6ad3d5e5f2fd7 (diff) | |
download | perl-8973db79328a885c91b9dfdcafdb28dbe9e65a88.tar.gz |
UTF8 tr/// fixes from Inaba Hiroto.
p4raw-id: //depot/perl@9008
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2871,6 +2871,15 @@ 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); + tbl[0x100] = rlen - j; + for (i=0; i < rlen - j; i++) + tbl[0x101+i] = r[j+i]; + } } else { if (!rlen && !del) { |