From c3981e12d3147e62c17abac89f5480fe64579d36 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 26 Nov 2010 22:38:05 +0100 Subject: [PATCH] Bugfix: use bufcopy instead of buf (Thanks fernando) --- src/cfgparse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cfgparse.y b/src/cfgparse.y index 260e3013..c2227f67 100644 --- a/src/cfgparse.y +++ b/src/cfgparse.y @@ -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; -- 2.39.5