]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed a bug in fixint sorter.
authorPavel Charvat <pavel.charvat@netcentrum.cz>
Wed, 26 Sep 2007 06:53:43 +0000 (08:53 +0200)
committerPavel Charvat <pavel.charvat@netcentrum.cz>
Wed, 26 Sep 2007 06:53:43 +0000 (08:53 +0200)
lib/sorter/s-fixint.h

index e5f820fcc704b5f10581b06e748db8c501ac6dd2..c8a2b9917659e0432c51aa6837665b25534bde99 100644 (file)
@@ -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];