* Patch: FYI: PR 31646
@ 2007-04-23 16:14 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2007-04-23 16:14 UTC (permalink / raw)
To: GCJ-patches
I'm checking this in on the trunk and the RH 4.1 branch.
This fixes an ugly bug in Arrays.qsort.
Tom
Index: ChangeLog
from Jeroen Frijters <jeroen@frijters.net>
PR classpath/31646:
* java/util/Arrays.java (qsort): Corrected initial median calculation.
Index: java/util/Arrays.java
===================================================================
--- java/util/Arrays.java (revision 123959)
+++ java/util/Arrays.java (working copy)
@@ -1040,7 +1040,7 @@
}
// Determine a good median element.
- int mid = count / 2;
+ int mid = from + count / 2;
int lo = from;
int hi = from + count - 1;
@@ -1204,7 +1204,7 @@
}
// Determine a good median element.
- int mid = count / 2;
+ int mid = from + count / 2;
int lo = from;
int hi = from + count - 1;
@@ -1368,7 +1368,7 @@
}
// Determine a good median element.
- int mid = count / 2;
+ int mid = from + count / 2;
int lo = from;
int hi = from + count - 1;
@@ -1544,7 +1544,7 @@
}
// Determine a good median element.
- int mid = count / 2;
+ int mid = from + count / 2;
int lo = from;
int hi = from + count - 1;
@@ -1720,7 +1720,7 @@
}
// Determine a good median element.
- int mid = count / 2;
+ int mid = from + count / 2;
int lo = from;
int hi = from + count - 1;
@@ -1890,7 +1890,7 @@
}
// Determine a good median element.
- int mid = count / 2;
+ int mid = from + count / 2;
int lo = from;
int hi = from + count - 1;
@@ -2060,7 +2060,7 @@
}
// Determine a good median element.
- int mid = count / 2;
+ int mid = from + count / 2;
int lo = from;
int hi = from + count - 1;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-04-23 16:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-23 16:14 Patch: FYI: PR 31646 Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).