fix valgrind error.

I did not understand what keys look like, then effed up when fixing that.
This commit is contained in:
Enno Rehling 2017-01-21 20:51:08 +01:00 committed by Enno Rehling
parent dbc6a17e66
commit 82193864c5
1 changed files with 1 additions and 1 deletions

View File

@ -731,7 +731,7 @@ void config_set_from(const dictionary *d)
const char *val;
size_t klen = strlen(keys[k]);
assert(klen+slen+1<sizeof(key));
memcpy(key+slen+1, keys[k]+slen+1, klen+1);
memcpy(key+slen+1, keys[k]+slen+1, klen-slen);
val = iniparser_getstring(d, keys[k], NULL);
if (val) {
config_set(key, val);