summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-03 19:19:42 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-03 19:19:42 +0000
commit8973db79328a885c91b9dfdcafdb28dbe9e65a88 (patch)
treed6d992600192764a3ae09df1bb2d021e39a2f95e /op.c
parent830ec763789df5f5b0683aa3c9e6ad3d5e5f2fd7 (diff)
downloadperl-8973db79328a885c91b9dfdcafdb28dbe9e65a88.tar.gz
UTF8 tr/// fixes from Inaba Hiroto.
p4raw-id: //depot/perl@9008
Diffstat (limited to 'op.c')
-rw-r--r--op.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/op.c b/op.c
index eb60121edf..4c5dd1302b 100644
--- a/op.c
+++ b/op.c
@@ -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) {