Commit b48b5506 authored by schneider's avatar schneider

change(config): Ignore case when reading a boolean

parent 726f15eb
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment