Skip to content
Snippets Groups Projects
Commit ee057c05 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix issue with iniSet* functions and root section

Bug introduced in commit 0d9111a5: iniSet* functions would write key/values to the end of the list when the root section (NULL) was specified, rather than the beginning of the list.
The root section always starts at the beginning of the list/file, so I'm not sure why section_start() was doing anything other than returning 0 for the root section. It's possible this now breaks iniSortSections() in some way, so that should be retested with a file with a root section and named sections.
parent 187f8f8a
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3135 passed
...@@ -195,7 +195,7 @@ static size_t find_section(str_list_t list, const char* section) ...@@ -195,7 +195,7 @@ static size_t find_section(str_list_t list, const char* section)
size_t i; size_t i;
if(section==ROOT_SECTION) if(section==ROOT_SECTION)
return section_start(list, 0); return 0;
i=find_section_index(list,section); i=find_section_index(list,section);
if(list[i]!=NULL) if(list[i]!=NULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment