Bugfix: use bufcopy instead of buf (Thanks fernando)

This commit is contained in:
Michael Stapelberg 2010-11-26 22:38:05 +01:00
parent ad8065e366
commit 53b3b1cb96
1 changed files with 2 additions and 2 deletions

View 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;