diff options
Autocommit at 14.06.2022 @ 14:34
1 files changed, 5 insertions, 0 deletions
| -rw-r--r-- | src/Models/CellString.cpp | 5 |
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 << '"'; } |
