Skip to content
Browse files

Tuples in Erlang are 1-indexed. Fix off-by-one error.

  • Loading branch information...
1 parent 1a4e083 commit 1c4731d91f1134e0da1e1a4389312a2deb219095 @jlouis committed Feb 18, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/hamt.erl
View
5 src/hamt.erl
@@ -89,7 +89,10 @@ mk_tuple(N, L) ->
search_mask(Bit, H) ->
Mask = ?SZ_Mask bsl (Bit - ?SZ),
- (Mask band H) bsr (Bit - ?SZ).
+ ((Mask band H) bsr (Bit - ?SZ)) + 1.
+
+
+

0 comments on commit 1c4731d

Please sign in to comment.
Something went wrong with that request. Please try again.