summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-05-15 21:07:12 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-05-15 21:07:12 +0100
commit28a97bb389434f88579473fa7a5d1a6e4846bd4d (patch)
treea3cbf4900ece74c715ae34f4ee284c251d8ae19d /config.c
parent216f6a152333b38a8563c570eb237c27585deedb (diff)
Make it more obvious that tabs in conditionals are tabs.
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/config.c b/config.c
index 78190f5..af30910 100644
--- a/config.c
+++ b/config.c
@@ -27,7 +27,7 @@ int getconfstr(char *confname, char *filename, char* dest) {
// Check if the next character after the length of the requested option
// name is an equals sign, a space, or a tab
- if (str[namelen] != '=' && str[namelen] != ' ' && str[namelen] != ' ') {
+ if (str[namelen] != '=' && str[namelen] != ' ' && str[namelen] != '\t') {
// If it isn't this can't have been our option
continue;
}
@@ -58,7 +58,7 @@ int getconfstr(char *confname, char *filename, char* dest) {
// Starting from the end of the option name, find the position of the start of the configuration value
// (including its double quotes) by skipping over everything that isn't an equals sign, a space, or a tab
for (size_t i = namelen; i < strlen(str); i++) {
- if (str[i] == '=' || str[i] == ' ' || str[i] == ' ') {
+ if (str[i] == '=' || str[i] == ' ' || str[i] == '\t') {
continue;
} else {
// Record current/final position in string