mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-22 10:29:31 +00:00
correct when entry doesn't exist but the index does
This commit is contained in:
parent
ba6f52623b
commit
20f15dbaa8
@ -45,11 +45,12 @@ void config_set_indexed_property(char *configuration,
|
||||
{
|
||||
/* yes, we add this property at the end of this indexed field */
|
||||
|
||||
index = config_get_next_property(configuration, last_index, NULL, NULL);
|
||||
if (index != -1)
|
||||
index = config_find_entry(configuration + index, index_name, NULL);
|
||||
if (index == -1)
|
||||
index = strlen(configuration);
|
||||
last_index = config_get_next_property(configuration, last_index, NULL, NULL);
|
||||
if (last_index != -1)
|
||||
last_index = config_find_entry(configuration + last_index, index_name, NULL);
|
||||
if (last_index == -1)
|
||||
last_index = strlen(configuration);
|
||||
index = last_index;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user