msxml3: Return NULL instead of empty string in IXMLElement::get_tagName.
This commit is contained in:
parent
f3a2cb7bbd
commit
fe0f945769
|
@ -893,7 +893,7 @@ static void test_xmlelem(void)
|
||||||
|
|
||||||
hr = IXMLElement_get_tagName(element, &str);
|
hr = IXMLElement_get_tagName(element, &str);
|
||||||
EXPECT_HR(hr, S_OK);
|
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);
|
SysFreeString(str);
|
||||||
|
|
||||||
parent = (IXMLElement *)0xdeadbeef;
|
parent = (IXMLElement *)0xdeadbeef;
|
||||||
|
|
|
@ -189,8 +189,12 @@ static HRESULT WINAPI xmlelem_get_tagName(IXMLElement *iface, BSTR *p)
|
||||||
if (!p)
|
if (!p)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
if (*This->node->name) {
|
||||||
*p = bstr_from_xmlChar(This->node->name);
|
*p = bstr_from_xmlChar(This->node->name);
|
||||||
CharUpperBuffW(*p, SysStringLen(*p));
|
CharUpperBuffW(*p, SysStringLen(*p));
|
||||||
|
}else {
|
||||||
|
*p = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("returning %s\n", debugstr_w(*p));
|
TRACE("returning %s\n", debugstr_w(*p));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue