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:
@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user