diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp index 65b992f6a..1736305d8 100644 --- a/src/sdl/i_main.cpp +++ b/src/sdl/i_main.cpp @@ -257,7 +257,12 @@ int main (int argc, char **argv) #if defined(__MACH__) && !defined(NOASM) unprotect_rtext(); #endif - + + // Set LC_NUMERIC environment variable in case some library decides to + // clear the setlocale call at least this will be correct. + // Note that the LANG environment variable is overridden by LC_* + setenv ("LC_NUMERIC", "C", 1); + #ifndef NO_GTK GtkAvailable = gtk_init_check (&argc, &argv); #endif