Skip to content

Fix crashes when using std::locale{""} with an invalid LC_ALL - #14812

Open
JoshuaVandaele wants to merge 1 commit into
dolphin-emu:masterfrom
JoshuaVandaele:correct-env-locale
Open

Fix crashes when using std::locale{""} with an invalid LC_ALL#14812
JoshuaVandaele wants to merge 1 commit into
dolphin-emu:masterfrom
JoshuaVandaele:correct-env-locale

Conversation

@JoshuaVandaele

Copy link
Copy Markdown
Contributor

Tested on Windows and Linux. I've also slipped in a semi-related clean up in PostProcessing.cpp that isn't worth its own PR imo but if anyone feels strongly about it I can remove it.

@JosJuice

JosJuice commented Aug 12, 2026

Copy link
Copy Markdown
Member

Do you foresee any uses of this where std::nullopt would lead to something other than falling back to std::locale::classic? If not, it could be better to return std::locale::classic from the function instead of std::nullopt.

@JoshuaVandaele

Copy link
Copy Markdown
Contributor Author

Do you foresee any uses of this where you're going to do something other than falling back to std::locale::classic? If not, it could be better to return std::locale::classic from the function instead of std::nullopt.

I can't come up with one, so let's do that instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants