]> git.sur5r.net Git - i3/i3/blobdiff - src/cfgparse.y
Bugfix: use bufcopy instead of buf (Thanks fernando)
[i3/i3] / src / cfgparse.y
index 7bbf66bf02e8f5432bfcad56ec30c50188e55b32..666445ccfae6c85558fbdacaa18f429c3b41493c 100644 (file)
@@ -126,8 +126,8 @@ void parse_file(const char *f) {
         SLIST_FOREACH(current, &variables, variables) {
                 int extra = (strlen(current->value) - strlen(current->key));
                 char *next;
-                for (next = buf;
-                     (next = strcasestr(buf + (next - buf), current->key)) != NULL;
+                for (next = bufcopy;
+                     (next = strcasestr(bufcopy + (next - bufcopy), current->key)) != NULL;
                      next += strlen(current->key)) {
                         *next = '_';
                         extra_bytes += extra;