From c9fd357c06f8660c7f02f57cde8bd392a75705f3 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Mon, 24 Jul 2023 23:43:25 -0400 Subject: [PATCH] fix: avoid infinite loop bug If the current tag is the last tag and the test fails, the j loop neverends. This prevents that by checking that in the j loop --- cli/src/test_tags.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/src/test_tags.rs b/cli/src/test_tags.rs index 024d094c..8c1fb34a 100644 --- a/cli/src/test_tags.rs +++ b/cli/src/test_tags.rs @@ -125,6 +125,9 @@ pub fn test_tag( } j += 1; + if tag == tags.last().unwrap() { + break 'tag_loop; + } } } else { break;