]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Skip leading whitespace in variable assignments (Thanks ben)
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 17 Dec 2011 11:16:34 +0000 (11:16 +0000)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 17 Dec 2011 11:16:34 +0000 (11:16 +0000)
Fixes: #577
src/cfgparse.y

index 7a6a73984731e50901f8b2ff3b2fe9bfcf5e9169..073ff241400b1aaa2cc071529abb21be5eb22d7c 100644 (file)
@@ -479,6 +479,8 @@ void parse_file(const char *f) {
                 v_value = strstr(value, "\t");
 
             *(v_value++) = '\0';
+            while (*v_value == '\t' || *v_value == ' ')
+                v_value++;
 
             struct Variable *new = scalloc(sizeof(struct Variable));
             new->key = sstrdup(v_key);