Fixed parsing of Config from AMF / 3MF if it started with an empty line.
This bug was introduced with e947a29fc8
This commit is contained in:
parent
b5742eabe0
commit
f92312b597
@ -696,10 +696,8 @@ ConfigSubstitutions ConfigBase::load_from_ini_string_commented(std::string &&dat
|
||||
for (size_t i = 0; i < data.size();)
|
||||
if (i == 0 || data[i] == '\n') {
|
||||
// Start of a line.
|
||||
if (i != 0) {
|
||||
// Consume LF.
|
||||
assert(data[i] == '\n');
|
||||
// Don't keep empty lines.
|
||||
if (data[i] == '\n') {
|
||||
// Consume LF, don't keep empty lines.
|
||||
if (j > 0 && data[j - 1] != '\n')
|
||||
data[j ++] = data[i];
|
||||
++ i;
|
||||
|
Loading…
Reference in New Issue
Block a user