From f23b47ba17e57923ca81d65770827db28d514bc9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 10 Jan 2014 20:07:31 +0100 Subject: Expat: attributes come in name/value pairs (bug fix) I wrongfully assumed that each array element is a name and a value concatenated. --- src/Expat.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Expat.cxx b/src/Expat.cxx index 0c7ff9315..82dce7682 100644 --- a/src/Expat.cxx +++ b/src/Expat.cxx @@ -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; } -- cgit v1.2.3