From: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> --- dlls/msxml3/msxml_private.h | 1 + dlls/msxml3/node.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h index 3a407ea9feb..19e5a35e992 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h @@ -261,6 +261,7 @@ extern struct domnode *domnode_addref(struct domnode *node); extern void domnode_release(struct domnode *node); extern struct domnode *domnode_get_root_element(struct domnode *doc); extern struct domnode *domnode_get_first_child(struct domnode *node); +extern struct domnode *domnode_get_last_child(struct domnode *node); extern struct domnode *domnode_get_next_sibling(struct domnode *node); extern HRESULT domnode_get_attribute(const struct domnode *node, const WCHAR *name, struct domnode **attr); extern HRESULT node_clone_domnode(struct domnode *, bool, struct domnode **); diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 5899ce47992..234622b4d29 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -376,6 +376,11 @@ struct domnode *domnode_get_first_child(struct domnode *node) return node_from_entry(list_head(&node->children)); } +struct domnode *domnode_get_last_child(struct domnode *node) +{ + return node_from_entry(list_tail(&node->children)); +} + static struct domnode *domnode_get_previous_sibling(struct domnode *node) { if (node->parent) @@ -391,7 +396,7 @@ HRESULT node_get_first_child(struct domnode *node, IXMLDOMNode **ret) HRESULT node_get_last_child(struct domnode *node, IXMLDOMNode **ret) { - return get_node(node_from_entry(list_tail(&node->children)), ret); + return get_node(domnode_get_last_child(node), ret); } HRESULT node_get_previous_sibling(struct domnode *node, IXMLDOMNode **ret) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10938