INI: Simplify loop
@@ -424,12 +424,9 @@ int ini_parse_file (FILE * file, const struct IniConfig * config, void * user)
{
ELEKTRA_LOG_DEBUG ("Found multiple delimiters");
ptr = start + 1;
- while (*ptr)
- {
- if (*ptr == delim)
+ while (*ptr && (*ptr != delim ||
+ (*(ptr + 1) != '"' && *(ptr + 2) != '"' && *(ptr - 1) != '"' && *(ptr - 2) != '"')))
{
- if (*(ptr + 1) == '"' || *(ptr + 2) == '"' || *(ptr - 1) == '"' || *(ptr - 2) == '"') break;
- }
++ptr;
}
if (*ptr)
