Change strtabs.nextTry to match the assumption in strtabs.del

This commit is contained in:
Oscar Nihlgård
2019-02-03 09:37:11 +01:00
parent 0091f2ad3b
commit 315abd7163

View File

@@ -117,7 +117,7 @@ proc mustRehash(length, counter: int): bool =
result = (length * 2 < counter * 3) or (length - counter < 4)
proc nextTry(h, maxHash: Hash): Hash {.inline.} =
result = ((5 * h) + 1) and maxHash
result = (h + 1) and maxHash
proc rawGet(t: StringTableRef, key: string): int =
var h: Hash = myhash(t, key) and high(t.data) # start with real hash value