Commit 858bebc7 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

msxml: Fixed list walking in xmlnodelist_get_length.

parent bc7df7ad
...@@ -334,17 +334,20 @@ static HRESULT WINAPI xmlnodelist_get_length( ...@@ -334,17 +334,20 @@ static HRESULT WINAPI xmlnodelist_get_length(
return S_OK; return S_OK;
} }
curr = This->node;
if(This->enum_children) if(This->enum_children)
{ {
tmp = curr; tmp = curr;
top_level_node = &tmp; top_level_node = &tmp;
} }
for(curr = This->node; curr; curr = get_next_node(&This->xinfo, curr, top_level_node)) while (curr)
{ {
r = xslt_next_match( &This->xinfo, &curr, top_level_node ); r = xslt_next_match( &This->xinfo, &curr, top_level_node );
if(FAILED(r) || !curr) break; if(FAILED(r) || !curr) break;
nodeCount++; nodeCount++;
curr = get_next_node(&This->xinfo, curr, top_level_node);
} }
*listLength = nodeCount; *listLength = nodeCount;
......
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