Skip to content

Commit 4c7ddcd

Browse files
litlighilitnarimiran
authored andcommitted
fixes #25162; fixup 0f5732b: withValue for immut tab wrong chk cond (#25163)
fixes #25162 ref #24825 (cherry picked from commit ff9cae8)
1 parent 377b6cc commit 4c7ddcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pure/collections/tables.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ template withValue*[A, B](t: Table[A, B], key: A,
707707
mixin rawGet
708708
var hc: Hash
709709
var index = rawGet(t, key, hc)
710-
if index > 0:
710+
if index >= 0:
711711
let value {.cursor, inject.} = t.data[index].val
712712
body1
713713
else:

0 commit comments

Comments
 (0)