Commit 876de4a7 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

xmllite/reader: Reset reader nesting depth on error.

parent ec9e05c2
......@@ -2847,6 +2847,7 @@ static HRESULT WINAPI xmlreader_Read(IXmlReader* iface, XmlNodeType *nodetype)
{
This->state = XmlReadState_Error;
This->nodetype = XmlNodeType_None;
This->depth = 0;
This->error = hr;
}
}
......
......@@ -2402,7 +2402,6 @@ static void test_max_element_depth(void)
hr = IXmlReader_Read(reader, NULL);
ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr);
todo_wine
TEST_DEPTH2(reader, 0, 2);
TEST_READER_STATE(reader, XmlReadState_Error);
......@@ -2412,7 +2411,6 @@ todo_wine
hr = IXmlReader_Read(reader, NULL);
ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr);
todo_wine
TEST_DEPTH2(reader, 0, 2);
TEST_READER_STATE(reader, XmlReadState_Error);
IStream_Release(stream);
......@@ -2454,7 +2452,6 @@ todo_wine
ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr);
ok(nodetype == XmlNodeType_None, "got node type %d\n", nodetype);
todo_wine
TEST_DEPTH2(reader, 0, 2);
TEST_READER_STATE(reader, XmlReadState_Error);
......
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