From 337e5723b8ff006b8aeb7ed094703b594ef6041d Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Sun, 6 Nov 2022 17:45:33 -0800 Subject: [PATCH] Remove commas from descriptions in csv files. --- common/project.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/project.cpp b/common/project.cpp index 48d47f10..eff545df 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -1463,7 +1463,10 @@ bool Project::ExportCSV(const QString& FileName) for (const auto& ColorIt : PartIt.second) { - sprintf(Line, "\"%s\",\"%s\",%d,%s,%d\n", Info->m_strDescription, gColorList[ColorIt.first].Name, ColorIt.second, Info->mFileName, gColorList[ColorIt.first].Code); + std::string Description = Info->m_strDescription; + Description.erase(std::remove(Description.begin(), Description.end(), ','), Description.end()); + + sprintf(Line, "\"%s\",\"%s\",%d,%s,%d\n", Description.c_str(), gColorList[ColorIt.first].Name, ColorIt.second, Info->mFileName, gColorList[ColorIt.first].Code); CSVFile.WriteLine(Line); } }