Fix bug where config file values with a colon were interpreted as entries (2)

This commit is contained in:
mintsuki 2020-04-24 17:28:19 +02:00
parent 7904025c9b
commit 2b6cf6296c
2 changed files with 6 additions and 0 deletions

Binary file not shown.

View File

@ -40,6 +40,8 @@ int config_get_entry_name(char *ret, size_t index, size_t limit) {
p++;
}
p++;
if (*(p - 2) != '\n')
i--;
}
size_t i;
@ -69,9 +71,13 @@ int config_set_entry(size_t index) {
config_addr = p;
cont:
while (*p != ':' && *p)
p++;
if (*p && *(p - 1) != '\n')
goto cont;
*p = 0;
return 0;