From: Martin Mares Date: Sat, 10 Feb 2007 20:15:36 +0000 (+0100) Subject: Fix an off-by-1 error. X-Git-Tag: holmes-import~506^2~13^2~146 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=264b43467496dd515d2c432d5f95201ce10600ce;p=libucw.git Fix an off-by-1 error. --- diff --git a/lib/sorter/s-fixint.h b/lib/sorter/s-fixint.h index 2eca66ff..91485093 100644 --- a/lib/sorter/s-fixint.h +++ b/lib/sorter/s-fixint.h @@ -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 }