From: Rhodri James Date: Thu, 2 Aug 2018 22:41:46 +0000 (+0100) Subject: Revise (according to @hartwork's plan) nearer to original code (#204) X-Git-Tag: R_2_2_6~7^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0959d8e409decb33719eca8c53d45d2dbaa4824f;p=libexpat Revise (according to @hartwork's plan) nearer to original code (#204) This reverts commit 3f5b1cfa75fc0f12432cdfeafd4fce1eea38a81f. --- diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index c3cd3859..448dc9f5 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -2910,9 +2910,11 @@ doContent(XML_Parser parser, poolClear(&parser->m_tempPool); freeBindings(parser, bindings); } - if ((parser->m_tagLevel == 0) && - !((parser->m_parsingStatus.parsing == XML_FINISHED) || (parser->m_parsingStatus.parsing == XML_SUSPENDED))) { - return epilogProcessor(parser, next, end, nextPtr); + if ((parser->m_tagLevel == 0) && (parser->m_parsingStatus.parsing != XML_FINISHED)) { + if (parser->m_parsingStatus.parsing == XML_SUSPENDED) + parser->m_processor = epilogProcessor; + else + return epilogProcessor(parser, next, end, nextPtr); } break; case XML_TOK_END_TAG: @@ -3107,9 +3109,6 @@ doContent(XML_Parser parser, switch (parser->m_parsingStatus.parsing) { case XML_SUSPENDED: *nextPtr = next; - if (end == next) { - parser->m_processor = epilogProcessor; - } return XML_ERROR_NONE; case XML_FINISHED: return XML_ERROR_ABORTED;