diff options
| Commit | 3e16f4c814816d1d9641700a1c7ffd9e2158afc9 (patch) | |
|---|---|---|
| Author | 2022-05-30 22:19:03 +0300 | |
| Committer | 2022-05-30 22:19:03 +0300 | |
| Files | 0596eb7b2684d4479953e06d449222899128a6ec /src | |
| FMI-OOP-P2_Tables-3e16f4c814816d1d9641700a1c7ffd9e2158afc9.tar FMI-OOP-P2_Tables-3e16f4c814816d1d9641700a1c7ffd9e2158afc9.tar.gz FMI-OOP-P2_Tables-3e16f4c814816d1d9641700a1c7ffd9e2158afc9.zip | ||
| Parent | d9deee99607e6f39042cd05eaa56f46ae305487c (diff) | |
Autocommit at 30.05.2022 @ 22:19
2 files changed, 6 insertions, 1 deletions
| -rw-r--r-- | src/Models/Table.cpp | 4 | ||||
| -rw-r--r-- | src/test2.table | 3 |
diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp index 4692a9e..5e7f2a9 100644 --- a/src/Models/Table.cpp +++ b/src/Models/Table.cpp @@ -91,13 +91,15 @@ void Table::readFromFile(std::ifstream& inFile) { else if (inFile.peek() == '"') { String res; inFile.get(); + char buffer; while (inFile.peek() != '"') { if (inFile.peek() == '\n') throw std::logic_error(fileLocationExceptionMsg("Error: Could not find a matching end quote for string at row ", cells.get_count(), inFile.tellg() % cols + 1)); if (inFile.peek() == '\\') { inFile.get(); } - res += inFile.get(); + buffer = inFile.get(); + res += (const char*)&buffer; } inFile.get(); diff --git a/src/test2.table b/src/test2.table new file mode 100644 index 0000000..b1eaa0a --- /dev/null +++ b/src/test2.table @@ -0,0 +1,3 @@ +8.6,3,"String", +,,, +,,, |
