We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a27891 commit a45f532Copy full SHA for a45f532
src/conf.c
@@ -336,7 +336,7 @@ static const struct option_t *find_option(const char name[])
336
struct option_t *option;
337
338
option = g_options;
339
- while (option) {
+ while (option->name) {
340
if (0 == strcmp(name, option->name)) {
341
return option;
342
}
@@ -427,7 +427,7 @@ static int conf_load_file(const char path[])
427
428
429
// parse --option value / --option
430
- ret = conf_set(option, value);
+ ret = conf_set(option, (ret == 2) ? value : NULL);
431
if (ret == EXIT_FAILURE) {
432
fclose(file);
433
return EXIT_FAILURE;
0 commit comments