Compare commits

...

2 commits

Author SHA1 Message Date
Maddox Werts
432cd5f695 Added case to not crash when checking a list that is too short 2025-03-21 10:18:20 -04:00
Maddox Werts
894ef92ac3 Fixed incorrect operation while checking arg 2025-03-21 10:18:03 -04:00

View file

@ -25,7 +25,17 @@ impl Arguments {
// Going through all arguments // Going through all arguments
for i in 0..args.len() { for i in 0..args.len() {
// Checking if it's an argument // Checking if it's an argument
if args[i].starts_with("--") { if !args[i].starts_with("--") {
continue;
}
// Is there something else after this?
if i + 1 > args.len() {
result.push(Argument {
key: args[i].clone(),
val: String::new(),
});
continue; continue;
} }