msxml3: Handle NULL XML declaration.

Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Daniel Lehman 2021-10-22 16:41:28 +03:00 committed by Alexandre Julliard
parent fd3cf6f2dd
commit 35ae01023b
2 changed files with 3 additions and 1 deletions

View File

@ -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))

View File

@ -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);