From: Hans Mulder Date: Sat, 28 Feb 1998 15:51:14 +0000 (-0500) Subject: print sort {-1} 1..10; hangs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b6917549c1d9faccceb8c8d200e8d408a1f58a1d;p=p5sagit%2Fp5-mst-13.2.git print sort {-1} 1..10; hangs p4raw-id: //depot/perl@773 --- diff --git a/pp_ctl.c b/pp_ctl.c index 9753fcf..35915fd 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -3559,9 +3559,10 @@ qsortsv( if (j != i) { /* Looks like we really need to move some things */ + int k; temp = array[i]; - for (--i; i >= j; --i) - array[i + 1] = array[i]; + for (k = i - 1; k >= j; --k) + array[k + 1] = array[k]; array[j] = temp; } }