]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: use bufcopy instead of buf (Thanks fernando)
authorMichael Stapelberg <michael@stapelberg.de>
Fri, 26 Nov 2010 21:38:05 +0000 (22:38 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 26 Nov 2010 21:38:05 +0000 (22:38 +0100)
src/cfgparse.y

index 260e30132fcbb12e2dc60ad493c7647fc835a230..c2227f67401d79574443538aa0257349ff5a95ed 100644 (file)
@@ -113,8 +113,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;