Skip to content

Commit ff9cae8

Browse files
authored
fixes #25162; fixup 0f5732b: withValue for immut tab wrong chk cond (#25163)
fixes #25162 ref #24825
1 parent bf2395a commit ff9cae8

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)