]> mj.ucw.cz Git - libucw.git/blobdiff - lib/sorter/array.c
Fixed a bug in s-internal, which caused it to write bogus records
[libucw.git] / lib / sorter / array.c
index cb8c7aa79f81f3d33511888aea9bced6f80d2382..e1805245ff4b1a609903fecca20120f7a8014416 100644 (file)
@@ -332,7 +332,7 @@ rs_radix(struct asort_context *ctx, void *array, void *buffer, uns num_elts, uns
       uns n = cnt[i] - pos;
       if (!n)
        continue;
-      if (n * ctx->elt_size < sorter_thread_threshold)
+      if (n * ctx->elt_size < sorter_thread_threshold || shift < ASORT_MIN_SHIFT)
        {
          struct rs_work *w = ep_alloc(ctx->eltpool);
          w->w.priority = 0;