From 2d8fcbcdcdd44cf1e3c4a726e187d461b702b6d7 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 16 Nov 2024 20:20:01 +0100 Subject: [PATCH] Fix regression causing mbrtowc(argv) to be called before setlocale() Fixes #10847 --- src/bin/fish.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/bin/fish.rs b/src/bin/fish.rs index aee360043..59cc6fe31 100644 --- a/src/bin/fish.rs +++ b/src/bin/fish.rs @@ -457,10 +457,6 @@ fn main() { } fn throwing_main() -> i32 { - let mut args: Vec = env::args_os() - .map(|osstr| str2wcstring(osstr.as_bytes())) - .collect(); - let mut res = 1; signal_unblock_all(); @@ -474,6 +470,9 @@ fn throwing_main() -> i32 { } } + let mut args: Vec = env::args_os() + .map(|osstr| str2wcstring(osstr.as_bytes())) + .collect(); if args.is_empty() { args.push("fish".into()); }