From: Pavel Charvat Date: Wed, 26 Sep 2007 06:53:43 +0000 (+0200) Subject: Fixed a bug in fixint sorter. X-Git-Tag: holmes-import~506^2~10^2~5 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=9dab5cbe00b8d288607c2a2c8d5421b656ed2a1e;p=libucw.git Fixed a bug in fixint sorter. --- diff --git a/lib/sorter/s-fixint.h b/lib/sorter/s-fixint.h index e5f820fc..c8a2b991 100644 --- a/lib/sorter/s-fixint.h +++ b/lib/sorter/s-fixint.h @@ -90,7 +90,7 @@ static int P(internal)(struct sort_context *ctx, struct sort_bucket *bin, struct #ifdef SORT_UNIFY if (i < n-1 && !P(compare)(&buf[i], &buf[i+1])) { - P(key) **keys = workspace; + P(key) **keys = (ctx->big_buf == (void *)buf) ? (void *)workspace : ctx->big_buf; uns n = 2; keys[0] = &buf[i]; keys[1] = &buf[i+1];