fixes #25162; fixup 0f5732bc8c: withValue for immut tab wrong chk cond (#25163)

fixes #25162
ref https://github.com/nim-lang/Nim/pull/24825
This commit is contained in:
lit
2025-09-12 20:07:05 +08:00
committed by GitHub
parent bf2395a62e
commit ff9cae896c

View File

@@ -707,7 +707,7 @@ template withValue*[A, B](t: Table[A, B], key: A,
mixin rawGet
var hc: Hash
var index = rawGet(t, key, hc)
if index > 0:
if index >= 0:
let value {.cursor, inject.} = t.data[index].val
body1
else: