We should match the full variable name.
This commit is contained in:
parent
b0ac71fe2a
commit
bd211d534b
@ -203,14 +203,18 @@ rc_config_value(RC_STRINGLIST *list, const char *entry)
|
|||||||
{
|
{
|
||||||
RC_STRING *line;
|
RC_STRING *line;
|
||||||
char *p;
|
char *p;
|
||||||
|
size_t len, dif;
|
||||||
|
|
||||||
|
len = strlen(entry);
|
||||||
TAILQ_FOREACH(line, list, entries) {
|
TAILQ_FOREACH(line, list, entries) {
|
||||||
p = strchr(line->value, '=');
|
p = strchr(line->value, '=');
|
||||||
if (p &&
|
if (p != NULL) {
|
||||||
strncmp(entry, line->value, (size_t)(p - line->value)) == 0)
|
dif = (p - line->value);
|
||||||
return p += 1;
|
if (dif == len &&
|
||||||
|
strncmp(entry, line->value, dif) == 0)
|
||||||
|
return ++p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
librc_hidden_def(rc_config_value)
|
librc_hidden_def(rc_config_value)
|
||||||
|
Loading…
Reference in New Issue
Block a user