From 315abd7163586778a03626c371d724cd138e7cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Nihlg=C3=A5rd?= Date: Sun, 3 Feb 2019 09:37:11 +0100 Subject: [PATCH] Change strtabs.nextTry to match the assumption in strtabs.del --- lib/pure/strtabs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/strtabs.nim b/lib/pure/strtabs.nim index cff5293c9b..377178f92b 100644 --- a/lib/pure/strtabs.nim +++ b/lib/pure/strtabs.nim @@ -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