aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-10 20:07:31 +0100
committerMax Kellermann <max@duempel.org>2014-01-10 22:56:28 +0100
commitf23b47ba17e57923ca81d65770827db28d514bc9 (patch)
tree4566853e894aafc6f2a078e9f842b0c74ce3689b
parent15eedfbb12b2b3f9a4c843306bcff947d17b8b4c (diff)
downloadmpd-f23b47ba17e57923ca81d65770827db28d514bc9.tar.gz
mpd-f23b47ba17e57923ca81d65770827db28d514bc9.tar.xz
mpd-f23b47ba17e57923ca81d65770827db28d514bc9.zip
Expat: attributes come in name/value pairs (bug fix)
I wrongfully assumed that each array element is a name and a value concatenated.
-rw-r--r--src/Expat.cxx4
1 files 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;
}