From 28a97bb389434f88579473fa7a5d1a6e4846bd4d Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Wed, 15 May 2019 21:07:12 +0100 Subject: Make it more obvious that tabs in conditionals are tabs. --- config.c | 4 ++-- 1 file 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 -- cgit v1.2.3