summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorleo2008-07-27 20:11:11 +0000
committerleo2008-07-27 20:11:11 +0000
commit68581f47c7056ce27c20da2f5800f6b3ee77ac24 (patch)
treec2065e60948f6e52b2416af3abdf1c4c0f33713b /common
parent9d6dc7d9025b856139d976bdfcb929f7b45b8a5a (diff)
Fixed decimal separator when writing LDraw files.
git-svn-id: http://svn.leocad.org/tags/leocad-0.75@728 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common')
-rw-r--r--common/project.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/project.cpp b/common/project.cpp
index 802c1bc..bf303cc 100644
--- a/common/project.cpp
+++ b/common/project.cpp
@@ -1238,8 +1238,7 @@ bool Project::DoSave(char* lpszPathName, bool bReplace)
else
ptr++;
- sprintf(buf, "0 Model exported from LeoCAD\r\n"
- "0 Original name: %s\r\n", ptr);
+ sprintf(buf, "0 Model exported from LeoCAD\r\n0 Original name: %s\r\n", ptr);
if (strlen(m_strAuthor) != 0)
{
strcat(buf, "0 Author: ");
@@ -1249,6 +1248,8 @@ bool Project::DoSave(char* lpszPathName, bool bReplace)
strcat(buf, "\r\n");
file.Write(buf, strlen(buf));
+ const char* OldLocale = setlocale(LC_NUMERIC, "C");
+
for (i = 1; i <= steps; i++)
{
for (pPiece = m_pPieces; pPiece; pPiece = pPiece->m_pNext)
@@ -1269,6 +1270,9 @@ bool Project::DoSave(char* lpszPathName, bool bReplace)
if (i != steps)
file.Write("0 STEP\r\n", 8);
}
+
+ setlocale(LC_NUMERIC, OldLocale);
+
file.Write("0\r\n", 3);
}
else