Skip to content
Snippets Groups Projects
Commit f6fdaf8e authored by rswindell's avatar rswindell
Browse files

iniRenameSection() returns FALSE if attempting to rename to an existing

(duplicate) section name.
parent 4897d109
No related branches found
No related tags found
No related merge requests found
......@@ -280,6 +280,10 @@ BOOL iniRenameSection(str_list_t* list, const char* section, const char* newname
if(section==ROOT_SECTION)
return(FALSE);
i=find_section_index(*list,newname);
if((*list)[i]!=NULL) /* duplicate */
return(FALSE);
i=find_section_index(*list,section);
if((*list)[i]==NULL) /* not found */
return(FALSE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment