Bugfix: use bufcopy instead of buf (Thanks fernando)
This commit is contained in:
parent
ad8065e366
commit
53b3b1cb96
|
@ -126,8 +126,8 @@ void parse_file(const char *f) {
|
||||||
SLIST_FOREACH(current, &variables, variables) {
|
SLIST_FOREACH(current, &variables, variables) {
|
||||||
int extra = (strlen(current->value) - strlen(current->key));
|
int extra = (strlen(current->value) - strlen(current->key));
|
||||||
char *next;
|
char *next;
|
||||||
for (next = buf;
|
for (next = bufcopy;
|
||||||
(next = strcasestr(buf + (next - buf), current->key)) != NULL;
|
(next = strcasestr(bufcopy + (next - bufcopy), current->key)) != NULL;
|
||||||
next += strlen(current->key)) {
|
next += strlen(current->key)) {
|
||||||
*next = '_';
|
*next = '_';
|
||||||
extra_bytes += extra;
|
extra_bytes += extra;
|
||||||
|
|
Loading…
Reference in New Issue