1
Fork 0

Fix ICE caused by at-expanding argument 0 instead of removing it early

This commit is contained in:
dekrain 2023-03-13 18:28:59 +01:00
parent f1b1ed7e18
commit 6240d45189
4 changed files with 24 additions and 5 deletions

View file

@ -18,6 +18,9 @@ fn arg_expand(arg: String) -> Result<Vec<String>, Error> {
}
}
/// **Note:** This function doesn't interpret argument 0 in any special way.
/// If this function is intended to be used with command line arguments,
/// `argv[0]` must be removed prior to calling it manually.
pub fn arg_expand_all(at_args: &[String]) -> Vec<String> {
let mut args = Vec::new();
for arg in at_args {