]> 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:39:53 +0000 (22:39 +0100)
src/cfgparse.y

index a9bda33d145341e6245182c5f5cc9a07581b020d..94142dc3d49e8bb2c83f773fcf2251ac4a551821 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;