]> mj.ucw.cz Git - libucw.git/blobdiff - lib/sorter/s-internal.h
Fixed buggy switching of buffers in the internal sorter.
[libucw.git] / lib / sorter / s-internal.h
index 3a7107fe41767679e93d820f0656e568fcc2bfd8..35ba1f50dde6ab00ddb1c98495f5900c5ebf542f 100644 (file)
@@ -177,6 +177,8 @@ static int P(internal)(struct sort_context *ctx, struct sort_bucket *bin, struct
     , workspace, bin->hash_bits
 #endif
     );
+  if ((void *)item_array != ctx->big_buf)
+    workspace = ctx->big_buf;
   last_item = item_array + count;
   ctx->total_int_time += get_timer(&timer);