1
0
mirror of https://github.com/janet-lang/janet synced 2025-12-03 07:08:09 +00:00

Fix infinite loop in some cases.

Problem - reusing a tainted variable without reinitializing.
This commit is contained in:
Calvin Rose
2020-05-16 08:28:50 -05:00
parent 92df01b99d
commit 7a84fc4742
2 changed files with 5 additions and 0 deletions

View File

@@ -281,4 +281,8 @@ neldb\0\0\0\xD8\x05printG\x01\0\xDE\xDE\xDE'\x03\0marshal_tes/\x02
(assert (= nil (peg/match peg2 "1:a2:bb:5:cccccc")) "lenprefix 6")
(assert (= nil (peg/match peg2 "1:a2:bb:7:cccccc")) "lenprefix 7")
# Regression #400
(assert (= nil (while (and false false) (fn []) (error "should not happen"))) "strangeloop 1")
(assert (= nil (while (not= nil nil) (fn []) (error "should not happen"))) "strangeloop 2")
(end-suite)