Fix parsing last line without CRLF/LF.

Check EOF at the end of the buffer.
This commit is contained in:
Raphael Coeffic
2021-12-31 10:53:11 +01:00
parent 9f348b513e
commit c2c23c43d9
4 changed files with 11 additions and 0 deletions
+1
View File
@@ -381,6 +381,7 @@ bool ModelsList::loadYaml()
if (bytes_read == 0)
break;
if (f_eof(&file)) yp.set_eof();
if (yp.parse(line, bytes_read) != YamlParser::CONTINUE_PARSING)
break;
}