Website Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
2 files changed, 6 insertions, 1 deletions
-rw-r--r--src/Models/Table.cpp4
-rw-r--r--src/test2.table3
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",
+,,,
+,,,