]> git.sur5r.net Git - i3/i3/commitdiff
Merge branch 'master' into next
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 20 Sep 2011 21:37:08 +0000 (22:37 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 20 Sep 2011 21:37:08 +0000 (22:37 +0100)
src/cfgparse.y

index b774f1304733551e1d7a2fe1c44358b6fa54140f..12a60f4df114c7490793184bbf5ced703bc84967 100644 (file)
@@ -465,8 +465,8 @@ void parse_file(const char *f) {
         int extra = (strlen(current->value) - strlen(current->key));
         char *next;
         for (next = bufcopy;
-             (bufcopy + (next - bufcopy)) < (buf + stbuf.st_size) &&
-             (next = strcasestr(bufcopy + (next - bufcopy), current->key)) != NULL;
+             next < (bufcopy + stbuf.st_size) &&
+             (next = strcasestr(next, current->key)) != NULL;
              next += strlen(current->key)) {
             *next = '_';
             extra_bytes += extra;