We should match the full variable name.

This commit is contained in:
Roy Marples 2009-04-24 11:45:48 +00:00
parent b0ac71fe2a
commit bd211d534b

View File

@ -203,14 +203,18 @@ rc_config_value(RC_STRINGLIST *list, const char *entry)
{
RC_STRING *line;
char *p;
size_t len, dif;
len = strlen(entry);
TAILQ_FOREACH(line, list, entries) {
p = strchr(line->value, '=');
if (p &&
strncmp(entry, line->value, (size_t)(p - line->value)) == 0)
return p += 1;
if (p != NULL) {
dif = (p - line->value);
if (dif == len &&
strncmp(entry, line->value, dif) == 0)
return ++p;
}
}
return NULL;
}
librc_hidden_def(rc_config_value)