mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix yaml array parsing
This commit is contained in:
parent
5755c616f3
commit
026ae756cf
2 changed files with 9 additions and 1 deletions
|
|
@ -139,8 +139,12 @@ void BasicParser<CharT>::skipLine() {
|
|||
|
||||
template<typename CharT>
|
||||
void BasicParser<CharT>::skipEmptyLines() {
|
||||
if (!hasNext()) {
|
||||
return;
|
||||
}
|
||||
size_t initpos = pos;
|
||||
skipWhitespace();
|
||||
pos = linestart;
|
||||
pos = std::max<size_t>(initpos, linestart);
|
||||
}
|
||||
|
||||
template<typename CharT>
|
||||
|
|
|
|||
|
|
@ -270,6 +270,10 @@ dv::value Parser::parseArray(int indent) {
|
|||
dv::value object = dv::object();
|
||||
object[std::string(name)] = parseFullValue(next_indent);
|
||||
skipEmptyLines();
|
||||
if (!hasNext()) {
|
||||
list.add(std::move(object));
|
||||
break;
|
||||
}
|
||||
next_indent = countIndent();
|
||||
if (next_indent > indent) {
|
||||
pos = linestart;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue