From 189ed246b187336ecc681a32f67f6318db63b18a Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 2 Jan 2018 16:29:42 +0100 Subject: [PATCH] Fixed: Crash in 3dsmax plugins (patch provided by Teanwen, thank you so much) --HG-- branch : develop --- code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp | 2 +- code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp | 2 +- code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp index f0de21376..035f96839 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp @@ -243,7 +243,7 @@ extern HINSTANCE hInstance; static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { // Set locale to english - setlocale (LC_NUMERIC, "English"); + setlocale (LC_NUMERIC, "C"); BOOL ret = TRUE; switch (msg) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp index 908d87c6d..7e5626496 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp @@ -1098,7 +1098,7 @@ static std::string OldDecimalSeparatorLocale; static void setDecimalSeparatorAsPoint() { OldDecimalSeparatorLocale = ::setlocale(LC_NUMERIC, NULL); - ::setlocale(LC_NUMERIC, "English"); + ::setlocale(LC_NUMERIC, "C"); } static void restoreDecimalSeparator() diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp index f89604dc3..b62ad3b6c 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp @@ -3522,7 +3522,7 @@ void EPM_PaintCMode::DoPaint () static float best = 10000.f; // Set local to english - setlocale (LC_NUMERIC, "English"); + setlocale (LC_NUMERIC, "C"); if (pobj->hOpsPanel) {