Skip to content
Snippets Groups Projects
Commit b48b5506 authored by schneider's avatar schneider
Browse files

change(config): Ignore case when reading a boolean

parent 726f15eb
No related branches found
No related tags found
1 merge request!375Default main app selector
......@@ -7,6 +7,7 @@
#include <stdbool.h>
#include <ctype.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <unistd.h>
#include <stddef.h>
......@@ -358,10 +359,10 @@ int epic_config_get_boolean(const char *key, bool *value)
char buf[MAX_LINE_LENGTH];
epic_config_get_string(key, buf, MAX_LINE_LENGTH);
if (!strcmp(buf, "true")) {
if (!strcasecmp(buf, "true")) {
*value = true;
return 0;
} else if (!strcmp(buf, "false")) {
} else if (!strcasecmp(buf, "false")) {
*value = false;
return 0;
}
......
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