Commit c9f5f2c6 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

msxml3: Correct createElement return value for an invalid type.

parent d4a4b12a
......@@ -270,8 +270,8 @@ static void test_createElement(void)
V_I4(&vType) = -1;
V_VT(&vName) = VT_NULL;
hr = IXMLDocument_createElement(doc, vType, vName, &element);
ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
ok(element != NULL, "Expected non-NULL element\n");
ok(hr == E_NOTIMPL, "Expected S_OK, got %d\n", hr);
ok(element == NULL, "Expected NULL element\n");
if (element != NULL)
{
......
......@@ -453,6 +453,9 @@ static HRESULT WINAPI xmldoc_createElement(IXMLDocument *iface, VARIANT vType,
if (V_VT(&vType) != VT_I4)
return E_INVALIDARG;
if(type_msxml_to_libxml(V_I4(&vType)) == -1)
return E_NOTIMPL;
node = xmlNewNode(NULL, empty);
node->type = type_msxml_to_libxml(V_I4(&vType));
......
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