Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
fix: prevent tcobalt from crashing when choosing an invalid picker in…
Browse files Browse the repository at this point in the history
…dex ahead-of-time
  • Loading branch information
khyerdev committed May 1, 2024
1 parent 948b080 commit dfde512
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ async fn execute_get_media(args: Args, bulk: u16, debug: bool) -> bool {
args.picker_choice
};

urls[(choice - 1) as usize].clone()
urls.get((choice - 1) as usize).unwrap_or(&urls[0]).clone()
} else {
json.get("url").unwrap().get_str().unwrap()
};
Expand Down

0 comments on commit dfde512

Please sign in to comment.