]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed multi-way sorting with custom presorting.
authorMartin Mares <mj@ucw.cz>
Thu, 6 Sep 2007 19:26:49 +0000 (21:26 +0200)
committerMartin Mares <mj@ucw.cz>
Thu, 6 Sep 2007 19:26:49 +0000 (21:26 +0200)
lib/sorter/govern.c

index f761eb7df9e9ed23e104b655f5eaefd499d4a0b5..97ef04422b18d399b8b41e0e5691f95485ebf9b1 100644 (file)
@@ -226,7 +226,7 @@ sorter_multiway(struct sort_context *ctx, struct sort_bucket *b)
 
   if (part_cnt <= 1)
     {
-      sh_off_t size = sbuck_ins_or_join(clist_head(&parts), list_pos, join, join_size);
+      sh_off_t size = sbuck_ins_or_join(clist_head(&parts), list_pos, (part_cnt ? NULL : join), join_size);
       SORT_XTRACE(trace_level, "Sorted in memory (%s, %dMB/s)", stk_fsize(size), sorter_speed(ctx, size));
       return;
     }