]> 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 5a560b14589bb4c8648cc6ab0a48af8c08d56470..35ba1f50dde6ab00ddb1c98495f5900c5ebf542f 100644 (file)
@@ -177,6 +177,9 @@ 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);
 
   SORT_XTRACE(5, "s-internal: Writing");