Mercurial > code
comparison ini.c @ 83:f028a84bc3f1
Fix an error
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 16 Nov 2011 21:40:33 +0100 |
parents | c8bbdbedcf07 |
children | 89e4d8d63bfa |
comparison
equal
deleted
inserted
replaced
82:c8bbdbedcf07 | 83:f028a84bc3f1 |
---|---|
291 struct ini_section *section; | 291 struct ini_section *section; |
292 | 292 |
293 sectionName = NULL; | 293 sectionName = NULL; |
294 for (i = 0; i < length; ++i) { | 294 for (i = 0; i < length; ++i) { |
295 /* Do not select the same section for performance. */ | 295 /* Do not select the same section for performance. */ |
296 if (sectionName == NULL || !strcmp(hdrs[i].section, sectionName)) { | 296 if (sectionName == NULL || strcmp(hdrs[i].section, sectionName) != 0) { |
297 sectionName = hdrs[i].section; | 297 sectionName = hdrs[i].section; |
298 section = ini_select_section(config, sectionName); | 298 section = ini_select_section(config, hdrs[i].section); |
299 } | 299 } |
300 | 300 |
301 /* Skip the section if does not exists in the config */ | 301 /* Skip the section if does not exists in the config */ |
302 if (section == NULL) | 302 if (section == NULL) |
303 continue; | 303 continue; |