diff --git a/ReflexToQ3/includes/oopless-parser.cpp b/ReflexToQ3/includes/oopless-parser.cpp index 54b0abb..13eb689 100644 --- a/ReflexToQ3/includes/oopless-parser.cpp +++ b/ReflexToQ3/includes/oopless-parser.cpp @@ -58,7 +58,7 @@ void write(const vector &entity, if (brushent) { // entity.begin() + i = vector that begins with KEYWORD_BRUSH // parsing functions will expect only the contents underneath the keyword. - move((entity.begin() + (i + 1)), entity.end(), brush.begin()); + move((entity.begin() + i), entity.end(), brush.begin()); } vector converted = e.convert(entity); if (converted.empty()) { @@ -72,7 +72,7 @@ void write(const vector &entity, stringstream ss; string line; copy(brush.begin(), brush.end(), ostream_iterator(ss, "\n")); - getline(ss, line); + getline(ss, line); // this both discards the brush keyboard and prevents a crash write(parse_brush(ss), fo, b); } fo << "}" << endl;