From e1b160b00511ff37bdd625b91e73e9335158190f Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 1 Apr 2015 23:39:59 +0300 Subject: [PATCH] msxml3: Explicitly list acceptable libxml2->msxml node types for unknode. --- dlls/msxml3/node.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 1178e60cea5..0f591b48271 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -1617,7 +1617,29 @@ static HRESULT WINAPI unknode_get_nodeType( FIXME("(%p)->(%p)\n", This, domNodeType); - *domNodeType = This->node.node->type; + switch (This->node.node->type) + { + case XML_ELEMENT_NODE: + case XML_ATTRIBUTE_NODE: + case XML_TEXT_NODE: + case XML_CDATA_SECTION_NODE: + case XML_ENTITY_REF_NODE: + case XML_ENTITY_NODE: + case XML_PI_NODE: + case XML_COMMENT_NODE: + case XML_DOCUMENT_NODE: + case XML_DOCUMENT_TYPE_NODE: + case XML_DOCUMENT_FRAG_NODE: + case XML_NOTATION_NODE: + /* we only care about this set of types, libxml2 type values are + exactly what we need */ + *domNodeType = (DOMNodeType)This->node.node->type; + break; + default: + *domNodeType = NODE_INVALID; + break; + } + return S_OK; }