|
@ -211,15 +211,15 @@ bool Jupiter::INIConfig::read_internal(const char *in_filename) { |
|
|
// Check if the line is over
|
|
|
// Check if the line is over
|
|
|
if (*read_head == '\n' || *read_head == '\r') { |
|
|
if (*read_head == '\n' || *read_head == '\r') { |
|
|
if (line_head == nullptr) { |
|
|
if (line_head == nullptr) { |
|
|
// There's not any pending data; process a view from the line_head to here
|
|
|
// There's no line_head; append what we have read to line and process that
|
|
|
process_line({ buffer, static_cast<size_t>(read_head - buffer) }); |
|
|
line.append(buffer, read_head); |
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
// There's pending data; join these together and process it
|
|
|
|
|
|
line.append(line_head, read_head); |
|
|
|
|
|
process_line(line); |
|
|
process_line(line); |
|
|
line.clear(); |
|
|
line.clear(); |
|
|
} |
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
// There's not any pending data; process a view from the line_head to here
|
|
|
|
|
|
process_line({ line_head, static_cast<size_t>(read_head - line_head) }); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Keep iterating until next non-newline character
|
|
|
// Keep iterating until next non-newline character
|
|
|
for (++read_head; read_head != read_end; ++read_head) { |
|
|
for (++read_head; read_head != read_end; ++read_head) { |
|
|