Commit 35ae0102 authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

msxml3: Handle NULL XML declaration.

parent fd3cf6f2
......@@ -754,6 +754,9 @@ HRESULT dom_pi_put_xml_decl(IXMLDOMNode *node, BSTR data)
HRESULT hr;
BSTR name;
if (!data)
return XML_E_XMLDECLSYNTAX;
node_obj = get_node_obj(node);
hr = node_set_content(node_obj, data);
if (FAILED(hr))
......
......@@ -8596,7 +8596,6 @@ static void test_createProcessingInstruction(void)
hr = IXMLDOMDocument_createProcessingInstruction(doc, NULL, _bstr_("version=\"1.0\" encoding=\"UTF-8\""), &pi);
ok(hr == E_FAIL, "got 0x%08x\n", hr);
hr = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), NULL, &pi);
todo_wine
ok(hr == XML_E_XMLDECLSYNTAX, "got 0x%08x\n", hr);
hr = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), _bstr_("version=\"1.0\" encoding=UTF-8"), &pi);
ok(hr == XML_E_MISSINGQUOTE, "got 0x%08x\n", hr);
......
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