From 0d3c21b03f6bad2977f965669c308bd429cf00bf Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sat, 29 Dec 2007 19:32:52 +0000 Subject: Move all code that relies on reading the to-be-thrown-away buffer ahead of the call to sv_chop() that throws it away. p4raw-id: //depot/perl@32777 --- pp_hot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pp_hot.c') diff --git a/pp_hot.c b/pp_hot.c index f987357bf8..c6b5c5c097 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -2197,10 +2197,8 @@ PP(pp_subst) else if ((i = m - s)) { /* faster from front */ d -= clen; m = d; + Move(s, d - i, i, char); sv_chop(TARG, d-i); - s += i; - while (i--) - *--d = *--s; if (clen) Copy(c, m, clen, char); } -- cgit v1.2.1