xmllite/reader: Reset reader nesting depth on error.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-03-13 12:27:55 +03:00 committed by Alexandre Julliard
parent ec9e05c27c
commit 876de4a73d
2 changed files with 1 additions and 3 deletions

View File

@ -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;
}
}

View File

@ -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);