Commit f23b47ba authored by Max Kellermann's avatar Max Kellermann

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

I wrongfully assumed that each array element is a name and a value concatenated.
parent 15eedfbb
...@@ -73,9 +73,9 @@ const char * ...@@ -73,9 +73,9 @@ const char *
ExpatParser::GetAttributeCase(const XML_Char **atts, ExpatParser::GetAttributeCase(const XML_Char **atts,
const char *name) 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)) if (StringEqualsCaseASCII(atts[i], name))
return atts[i] + strlen(name) + 1; return atts[i + 1];
return nullptr; return nullptr;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment