summaryrefslogtreecommitdiffstats
path: root/src/object/robotmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/robotmain.cpp')
-rw-r--r--src/object/robotmain.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index 29fdd31..7c6cb77 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -3833,7 +3833,12 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
int rankObj = 0;
int rankGadget = 0;
CObject* sel = 0;
+
+ std::string oldLocale;
char *locale = setlocale(LC_NUMERIC, nullptr);
+ if (locale != nullptr)
+ oldLocale = locale;
+
setlocale(LC_NUMERIC, "C");
while (fgets(line, 500, file) != NULL)
@@ -4568,8 +4573,8 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
}
m_dialog->SetSceneRead("");
m_dialog->SetStackRead("");
-
- setlocale(LC_NUMERIC, locale);
+
+ setlocale(LC_NUMERIC, oldLocale.c_str());
}
//! Creates an object of decoration mobile or stationary