]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed bug in calculation of radix split width.
authorMartin Mares <mj@ucw.cz>
Tue, 22 May 2007 21:04:29 +0000 (23:04 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 22 May 2007 21:04:29 +0000 (23:04 +0200)
lib/sorter/govern.c

index 9f525e60c67c22b695328d873ba43cf0fa711306..4c578ab3efa80cb40acd214dcfc7e3afb31eb589 100644 (file)
@@ -173,7 +173,8 @@ sorter_twoway(struct sort_context *ctx, struct sort_bucket *b)
 static uns
 sorter_radix_bits(struct sort_context *ctx, struct sort_bucket *b)
 {
-  if (!b->hash_bits || !ctx->radix_split ||
+  if (!b->hash_bits || b->hash_bits < sorter_min_radix_bits ||
+      !ctx->radix_split ||
       (b->flags & SBF_CUSTOM_PRESORT) ||
       (sorter_debug & SORT_DEBUG_NO_RADIX))
     return 0;