Fix infinite loop and undefined behavior in del(.[nan]) (#3490)

This commit is contained in:
itchyny authored and GitHub committed 2026-03-02 21:58:28 +09:00
1 parent 262f0b81c1
commit 0df54c888a
2 files changed
+15 -4

No files matched your search

+8
View File
@@ -1176,6 +1176,14 @@ del(.[1], .[-6], .[2], .[-3:9])
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
[0, 3, 5, 6, 9]
del(.[nan])
[1,2,3]
[1,2,3]
del(.[nan,nan])
[1,2,3]
[1,2,3]
# negative index
setpath([-1]; 1)
[0]