From: Michael Stapelberg Date: Fri, 26 Nov 2010 21:38:05 +0000 (+0100) Subject: Bugfix: use bufcopy instead of buf (Thanks fernando) X-Git-Tag: 3.e-bf2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=53b3b1cb964d2ef74d1fb9dfb89eeb73b9170837;p=i3%2Fi3 Bugfix: use bufcopy instead of buf (Thanks fernando) --- diff --git a/src/cfgparse.y b/src/cfgparse.y index a9bda33d..94142dc3 100644 --- a/src/cfgparse.y +++ b/src/cfgparse.y @@ -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;