msxml3: Correct createElement return value for an invalid type.
This commit is contained in:
parent
d4a4b12a43
commit
c9f5f2c6a2
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue