From 68581f47c7056ce27c20da2f5800f6b3ee77ac24 Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 27 Jul 2008 20:11:11 +0000 Subject: Fixed decimal separator when writing LDraw files. git-svn-id: http://svn.leocad.org/tags/leocad-0.75@728 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/project.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'common') 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 -- cgit v1.2.3