Commit fe0f9457 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

msxml3: Return NULL instead of empty string in IXMLElement::get_tagName.

parent f3a2cb7b
......@@ -893,7 +893,7 @@ static void test_xmlelem(void)
hr = IXMLElement_get_tagName(element, &str);
EXPECT_HR(hr, S_OK);
ok(lstrlenW(str) == 0, "Expected empty tag name\n");
ok(!str, "Expected empty tag name, got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
parent = (IXMLElement *)0xdeadbeef;
......
......@@ -189,8 +189,12 @@ static HRESULT WINAPI xmlelem_get_tagName(IXMLElement *iface, BSTR *p)
if (!p)
return E_INVALIDARG;
*p = bstr_from_xmlChar(This->node->name);
CharUpperBuffW(*p, SysStringLen(*p));
if (*This->node->name) {
*p = bstr_from_xmlChar(This->node->name);
CharUpperBuffW(*p, SysStringLen(*p));
}else {
*p = NULL;
}
TRACE("returning %s\n", debugstr_w(*p));
......
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