]> mj.ucw.cz Git - libucw.git/commitdiff
Join in the rare case that presorting creates a single run, which is
authorMartin Mares <mj@ucw.cz>
Fri, 31 Aug 2007 13:45:28 +0000 (15:45 +0200)
committerMartin Mares <mj@ucw.cz>
Fri, 31 Aug 2007 13:45:28 +0000 (15:45 +0200)
not known in advance to be final.

lib/sorter/govern.c

index 7b67110ba21318360976ac95263ee7b964c3d711..f761eb7df9e9ed23e104b655f5eaefd499d4a0b5 100644 (file)
@@ -158,7 +158,7 @@ sorter_twoway(struct sort_context *ctx, struct sort_bucket *b)
   do {
     ++pass;
     sorter_start_timer(ctx);
-    if (ins[0]->runs == 1 && ins[1]->runs == 1 && join)
+    if (ins[0]->runs <= 1 && ins[1]->runs <= 1 && join)
       {
        // This is guaranteed to produce a single run, so join if possible
        outs[0] = join;