diff --git a/projects/aoc/src/year2020/Bags.kiss b/projects/aoc/src/year2020/Bags.kiss index b0f3e585..37733285 100644 --- a/projects/aoc/src/year2020/Bags.kiss +++ b/projects/aoc/src/year2020/Bags.kiss @@ -2,7 +2,7 @@ (bag.substr 0 (Math.floor (- (bag.indexOf "bag") 1)))) (defun parseRule [:String line :ParentMap parentMap :ChildMap childMap] - (unless (line.indexOf "contain no other bags") + (unless (<= 0 (line.indexOf "contain no other bags")) (let [[containerStr contents] (line.split "contain ") contentStrs (contents.split ", ")] (deflocal :Map innerMap (new Map))