aboutsummaryrefslogtreecommitdiff
path: root/src/ini.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ini.c')
-rw-r--r--src/ini.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ini.c b/src/ini.c
index 2f94b5b..2d2eb57 100644
--- a/src/ini.c
+++ b/src/ini.c
@@ -23,14 +23,17 @@ struct INISection *ini_section_search(struct INIFILE **ini, unsigned mode, char
if (mode == INI_SEARCH_EXACT) {
if (!strcmp((*ini)->section[i]->key, value)) {
result = (*ini)->section[i];
+ break;
}
} else if (mode == INI_SEARCH_BEGINS) {
if (startswith((*ini)->section[i]->key, value)) {
result = (*ini)->section[i];
+ break;
}
} else if (mode == INI_SEARCH_SUBSTR) {
if (strstr((*ini)->section[i]->key, value)) {
result = (*ini)->section[i];
+ break;
}
}
}