aboutsummaryrefslogtreecommitdiff
path: root/TXTParser.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-22 17:12:35 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-22 17:12:35 +0200
commit99d7d1695fec28208e19b34bc754dff5dd1e5642 (patch)
treed118eaa45d090562893e36f2122789da8c777ce5 /TXTParser.cpp
parent2de024ba832eecca59a512e9f8e3e1f6e8a0d8a3 (diff)
fix txt parser
Diffstat (limited to 'TXTParser.cpp')
-rw-r--r--TXTParser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/TXTParser.cpp b/TXTParser.cpp
index 5d0820f..07ae62b 100644
--- a/TXTParser.cpp
+++ b/TXTParser.cpp
@@ -151,11 +151,12 @@ static void parse_header(MuseumDeserializer & d, istringstream & input) {
static void parse_canvas(MuseumDeserializer & d, istringstream & input) {
unsigned int x = 0, y = 0;
char c;
- while (input >> c) {
+ while (input.get(c)) {
if (c == '\r') continue;
if (c == '\n') {
x = 0;
y += 1;
+ continue;
}
d.set_tile({ .x = x, .y = y, .type = string(1, c), });
x += 1;