]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Accept '\t' in the 'set' command, don’t die but ELOG in case of errors (Thank...
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 25 Aug 2011 19:58:03 +0000 (21:58 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 25 Aug 2011 19:58:03 +0000 (21:58 +0200)
src/cfgparse.y

index abbe4da0a40a90a8d0a3b856db6fe0e13a9f5a7d..a80e25afac808de6e073e97cc1c7b8ccb0d0ebd8 100644 (file)
@@ -350,13 +350,18 @@ void parse_file(const char *f) {
             continue;
 
         if (strcasecmp(key, "set") == 0) {
-            if (value[0] != '$')
-                die("Malformed variable assignment, name has to start with $\n");
+            if (value[0] != '$') {
+                ELOG("Malformed variable assignment, name has to start with $\n");
+                continue;
+            }
 
             /* get key/value for this variable */
             char *v_key = value, *v_value;
-            if ((v_value = strstr(value, " ")) == NULL)
-                die("Malformed variable assignment, need a value\n");
+            if ((v_value = strstr(value, " ")) == NULL &&
+                (v_value = strstr(value, "\t")) == NULL) {
+                ELOG("Malformed variable assignment, need a value\n");
+                continue;
+            }
 
             *(v_value++) = '\0';