Fix regression causing mbrtowc(argv) to be called before setlocale()

Fixes #10847
This commit is contained in:
Johannes Altmanninger 2024-11-16 20:20:01 +01:00
parent 68b9f96f84
commit 2d8fcbcdcd

View file

@ -457,10 +457,6 @@ fn main() {
} }
fn throwing_main() -> i32 { fn throwing_main() -> i32 {
let mut args: Vec<WString> = env::args_os()
.map(|osstr| str2wcstring(osstr.as_bytes()))
.collect();
let mut res = 1; let mut res = 1;
signal_unblock_all(); signal_unblock_all();
@ -474,6 +470,9 @@ fn throwing_main() -> i32 {
} }
} }
let mut args: Vec<WString> = env::args_os()
.map(|osstr| str2wcstring(osstr.as_bytes()))
.collect();
if args.is_empty() { if args.is_empty() {
args.push("fish".into()); args.push("fish".into());
} }