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
This commit is contained in:
Amaan Qureshi 2023-07-24 23:43:25 -04:00
parent 9fbc34fd3e
commit c9fd357c06
No known key found for this signature in database
GPG key ID: E67890ADC4227273

View file

@ -125,6 +125,9 @@ pub fn test_tag(
}
j += 1;
if tag == tags.last().unwrap() {
break 'tag_loop;
}
}
} else {
break;