Expat: attributes come in name/value pairs (bug fix)

I wrongfully assumed that each array element is a name and a value
concatenated.
This commit is contained in:
Max Kellermann 2014-01-10 20:07:31 +01:00
parent 15eedfbb12
commit f23b47ba17
1 changed files with 2 additions and 2 deletions

View File

@ -73,9 +73,9 @@ const char *
ExpatParser::GetAttributeCase(const XML_Char **atts,
const char *name)
{
for (unsigned i = 0; atts[i] != nullptr; ++i)
for (unsigned i = 0; atts[i] != nullptr; i += 2)
if (StringEqualsCaseASCII(atts[i], name))
return atts[i] + strlen(name) + 1;
return atts[i + 1];
return nullptr;
}