changeset 83:f028a84bc3f1

Fix an error
author David Demelier <markand@malikania.fr>
date Wed, 16 Nov 2011 21:40:33 +0100
parents c8bbdbedcf07
children 89e4d8d63bfa
files ini.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ini.c	Wed Nov 16 21:28:35 2011 +0100
+++ b/ini.c	Wed Nov 16 21:40:33 2011 +0100
@@ -293,9 +293,9 @@
 	sectionName = NULL;
 	for (i = 0; i < length; ++i) {
 		/* Do not select the same section for performance. */
-		if (sectionName == NULL || !strcmp(hdrs[i].section, sectionName)) {
+		if (sectionName == NULL || strcmp(hdrs[i].section, sectionName) != 0) {
 			sectionName	= hdrs[i].section;
-			section		= ini_select_section(config, sectionName);
+			section		= ini_select_section(config, hdrs[i].section);
 		}
 
 		/* Skip the section if does not exists in the config */