Permalink
Browse files

bugfix in random test.

  • Loading branch information...
1 parent 41c08ef commit 809c0e8d8b3b9f7c1baec1693ea5e482f6ba259e @esstrifork esstrifork committed Jun 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/test/java/com/trifork/deltazip/DeltaZipTest.java
@@ -171,7 +171,7 @@ public void somewhat_related_test() throws IOException {
for (int j=0; j<nRuns; j++) {
int start = 0, end = tmp.length;
int iters = rnd.nextInt(10);
- for (int k=0; k<iters; k++) { // Select part.
+ for (int k=0; k<iters && start<end; k++) { // Select part.
int mid = start + rnd.nextInt(end - start);
if (rnd.nextBoolean()) start=mid; else end=mid;
}

0 comments on commit 809c0e8

Please sign in to comment.