]> granicus.if.org Git - libexpat/commitdiff
Revise (according to @hartwork's plan) nearer to original code (#204)
authorRhodri James <rhodri@wildebeest.org.uk>
Thu, 2 Aug 2018 22:41:46 +0000 (23:41 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Fri, 3 Aug 2018 18:25:40 +0000 (20:25 +0200)
This reverts commit 3f5b1cfa75fc0f12432cdfeafd4fce1eea38a81f.

expat/lib/xmlparse.c

index c3cd3859390e15f358aa801d5fdb343a3dc456f9..448dc9f579e34e3bd978e3d63bff060e314cb8e8 100644 (file)
@@ -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;