]> mj.ucw.cz Git - libucw.git/commitdiff
Fix an off-by-1 error.
authorMartin Mares <mj@ucw.cz>
Sat, 10 Feb 2007 20:15:36 +0000 (21:15 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 10 Feb 2007 20:15:36 +0000 (21:15 +0100)
lib/sorter/s-fixint.h

index 2eca66fff2f14054dc444c0ecbbe34239e46fb24..9148509360f878ef73a2f7e31eacbdbc8519df1c 100644 (file)
@@ -61,5 +61,5 @@ static int P(internal)(struct sort_context *ctx, struct sort_bucket *bin, struct
 static u64
 P(internal_estimate)(struct sort_context *ctx, struct sort_bucket *b UNUSED)
 {
-  return ctx->big_buf_half_size;
+  return ctx->big_buf_half_size - 1;   // -1 since if the buffer is full, we don't recognize EOF
 }