Skip to content

Commit

Permalink
merging ini removes empty items
Browse files Browse the repository at this point in the history
  • Loading branch information
malytomas committed Nov 15, 2023
1 parent ebbb80c commit 7f2fa99
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sources/libcore/ini.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,13 @@ namespace cage
for (const String &s : source->sections())
{
for (const String &i : source->items(s))
set(s, i, source->get(s, i));
{
const String v = source->get(s, i);
if (v.empty())
itemRemove(s, i);
else
set(s, i, v);
}
}
}

Expand Down

0 comments on commit 7f2fa99

Please sign in to comment.