From ecf6256887ab7c1e460d4349ddd608152a1a1d2c Mon Sep 17 00:00:00 2001 From: doligez Date: Tue, 29 Jan 2008 13:14:33 +0000 Subject: [PATCH] off-by-one error --- stdlib/weak.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/weak.ml b/stdlib/weak.ml index fd41127fb..de5f85286 100644 --- a/stdlib/weak.ml +++ b/stdlib/weak.ml @@ -149,7 +149,7 @@ module Make (H : Hashtbl.HashedType) : (S with type data = H.t) = struct let live = count_bucket 0 bucket 0 in if live <= prev_len then begin let rec loop i j = - if j > prev_len then begin + if j >= prev_len then begin if check bucket i then loop (i + 1) j else if check bucket j then begin blit bucket j bucket i 1;