From b5a9ae03e7c6b7cb163195ccd1d90e3f5735311d Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 7 Mar 2013 16:12:53 +0100 Subject: [PATCH] fixed stupid bug in FHashble.Flat --- fHashtbl.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fHashtbl.ml b/fHashtbl.ml index 7c2b8bd6..6b32e727 100644 --- a/fHashtbl.ml +++ b/fHashtbl.ml @@ -353,8 +353,10 @@ module Flat(X : HASH) = struct else match PArray.get buckets i with | Used (key, value) -> (* insert key -> value into new array *) - insert buckets' (X.hash key) key value - | _ -> buckets' + let buckets' = insert buckets' (X.hash key) key value in + tranfer buckets' (i+1) + | _ -> + tranfer buckets' (i+1) in tranfer buckets' 0 (** Lookup [key] in the table *)