From 553111770e5f3df085130378e249e6cf52859a4d Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 14 Jun 2022 14:34:33 +0300 Subject: Autocommit at 14.06.2022 @ 14:34 --- src/Models/CellString.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Models/CellString.cpp') diff --git a/src/Models/CellString.cpp b/src/Models/CellString.cpp index f323a7c..2a105ef 100644 --- a/src/Models/CellString.cpp +++ b/src/Models/CellString.cpp @@ -20,4 +20,9 @@ void CellString::parseAndSetValue(const char* str) { void CellString::writeToFile(std::ofstream& file) { file << '"'; const char* strCpy = value.get_cstr(); + while (*strCpy != '\0') { + if (*strCpy == '\\' || *strCpy == '"') file << '\\'; + file << *(strCpy++); + } + file << '"'; } -- cgit v1.3.1-23-gd82d