]> mj.ucw.cz Git - libucw.git/blobdiff - sherlock/xml/parse.c
XML: Fixed reporting of characters via the PULL interface.
[libucw.git] / sherlock / xml / parse.c
index 572b6b96b77a0136d6a4259a6569e7b51232080c..0d62112a4c86004a7cc5082e8e578f6e34834484 100644 (file)
@@ -423,7 +423,7 @@ xml_flush_chars(struct xml_context *ctx)
     {
       if ((ctx->flags & XML_REPORT_CHARS) && ctx->h_block && (rlen = xml_report_chars(ctx, &rtext)))
        ctx->h_block(ctx, rtext, rlen);
-      if (!(ctx->flags & XML_ALLOC_CHARS) && (!(ctx->flags & XML_REPORT_CHARS) || !ctx->h_chars))
+      if (!(ctx->flags & XML_ALLOC_CHARS) && !(ctx->flags & XML_REPORT_CHARS) && !ctx->h_chars)
         {
          mp_restore(ctx->pool, &ctx->chars_state);
          return 0;
@@ -1111,7 +1111,7 @@ epilog:
 uns
 xml_parse(struct xml_context *ctx)
 {
-  /* This cycle shoud run only once unless the user overrides the value of ctx->pull in a SAX handler */
+  /* This cycle should run only once unless the user overrides the value of ctx->pull in a SAX handler */
   do
     {
       ctx->pull = 0;