[libxml2] wrong error column in structured error when parsing end tag



commit 24fb4c329a9b8e142e9d388901a1c59a07f94ed5
Author: Juergen Keil <jrgn keil googlemail com>
Date:   Mon Oct 6 18:19:12 2014 +0800

    wrong error column in structured error when parsing end tag
    
    For https://bugzilla.gnome.org/show_bug.cgi?id=734283
    
    libxml2 reports wrong error column numbers (field int2 in xmlError)
    in structured error handler, after parsing an end tag.

 parser.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/parser.c b/parser.c
index 39d391b..3de828b 100644
--- a/parser.c
+++ b/parser.c
@@ -9719,9 +9719,11 @@ xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlChar *prefix,
     if ((tlen > 0) && (xmlStrncmp(ctxt->input->cur, ctxt->name, tlen) == 0)) {
         if (ctxt->input->cur[tlen] == '>') {
            ctxt->input->cur += tlen + 1;
+           ctxt->input->col += tlen + 1;
            goto done;
        }
        ctxt->input->cur += tlen;
+       ctxt->input->col += tlen;
        name = (xmlChar*)1;
     } else {
        if (prefix == NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]