webservices: Don't validate reader state in read_endelement.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2016-02-03 15:43:44 +01:00 committed by Alexandre Julliard
parent 417ac65ef6
commit b960e6f81b
2 changed files with 1 additions and 11 deletions

View File

@ -1101,16 +1101,6 @@ static HRESULT read_endelement( struct reader *reader )
WS_XML_STRING *prefix, *localname;
HRESULT hr;
switch (reader->state)
{
case READER_STATE_TEXT:
case READER_STATE_STARTELEMENT:
case READER_STATE_STARTENDELEMENT:
break;
default:
return WS_E_INVALID_FORMAT;
}
if (read_cmp( reader, "</", 2 )) return WS_E_INVALID_FORMAT;
read_skip( reader, 2 );

View File

@ -885,7 +885,7 @@ static void test_WsReadStartElement(void)
if (node) ok( node->nodeType == WS_XML_NODE_TYPE_END_ELEMENT, "got %u\n", node->nodeType );
hr = WsReadEndElement( reader, NULL );
todo_wine ok( hr == S_OK, "got %08x\n", hr );
ok( hr == S_OK, "got %08x\n", hr );
hr = WsGetReaderNode( reader, &node, NULL );
ok( hr == S_OK, "got %08x\n", hr );