ini: reset removeSectionKey only when needed
@@ -1263,9 +1263,12 @@ static int iniWriteKeySet (FILE * fh, Key * parentKey, KeySet * returned, IniPlu
}
else
{
- if (removeSectionKey) keyDel (sectionKey);
- sectionKey = parentKey;
+ if (removeSectionKey)
+ {
+ keyDel (sectionKey);
removeSectionKey = 0;
+ }
+ sectionKey = parentKey;
fprintf (fh, "[]\n");
}
}
