Signed-off-by: Jeff Smith whydoubt@gmail.com --- dlls/xmllite/reader.c | 10 +++++----- dlls/xmllite/tests/reader.c | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c index dd033f37c5..701dd9cc31 100644 --- a/dlls/xmllite/reader.c +++ b/dlls/xmllite/reader.c @@ -1385,7 +1385,6 @@ static HRESULT reader_parse_xmldecl(xmlreader *reader) reader->nodetype = XmlNodeType_XmlDeclaration; reader->empty_element.position = position; reader_strvaldup(reader, &strval_xml, &reader->empty_element.localname); - reader_strvaldup(reader, &strval_xml, &reader->empty_element.qname);
return S_OK; } @@ -1620,8 +1619,6 @@ static HRESULT reader_parse_pi(xmlreader *reader) if (FAILED(hr)) return hr; reader_free_strvalued(reader, &reader->empty_element.localname); reader_strvaldup(reader, &target, &reader->empty_element.localname); - reader_free_strvalued(reader, &reader->empty_element.qname); - reader_strvaldup(reader, &target, &reader->empty_element.qname); reader_set_strvalue(reader, &strval_empty); reader->resumestate = XmlReadResumeState_PIBody; reader->resume[XmlReadResume_Body] = reader_get_cur(reader); @@ -3141,11 +3138,14 @@ static HRESULT WINAPI xmlreader_GetQualifiedName(IXmlReader* iface, LPCWSTR *nam } break; case XmlNodeType_DocumentType: - case XmlNodeType_XmlDeclaration: - case XmlNodeType_ProcessingInstruction: *name = This->empty_element.qname.str; *len = This->empty_element.qname.len; break; + case XmlNodeType_XmlDeclaration: + case XmlNodeType_ProcessingInstruction: + *name = This->empty_element.localname.str; + *len = This->empty_element.localname.len; + break; default: FIXME("Unhandled node type %d\n", nodetype); *name = NULL; diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c index c93ee01fa1..e421178c4e 100644 --- a/dlls/xmllite/tests/reader.c +++ b/dlls/xmllite/tests/reader.c @@ -2534,7 +2534,8 @@ static void test_string_pointers(void) ok(empty == reader_value(reader, ""), "empty != value\n"); ok(empty == reader_prefix(reader, ""), "empty != prefix\n"); xml = reader_name(reader, "xml"); - ptr = reader_qname(reader, "xml"); todo_wine ok(xml == ptr, "xml != qname\n"); + ptr = reader_qname(reader, "xml"); + ok(xml == ptr, "xml != qname\n"); ok(empty == reader_namespace(reader, ""), "empty != namespace\n");
next_attribute(reader);