Fix ICE caused by at-expanding argument 0 instead of removing it early
This commit is contained in:
parent
f1b1ed7e18
commit
6240d45189
4 changed files with 24 additions and 5 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue