[libxml2] Fix column number accounting in xmlParse*NameAndCompare
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix column number accounting in xmlParse*NameAndCompare
- Date: Sun, 9 Aug 2020 13:02:23 +0000 (UTC)
commit b82fa3dd26a72c89ced293d06269eb97bb252d76
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Sun Aug 9 14:50:46 2020 +0200
Fix column number accounting in xmlParse*NameAndCompare
Thanks to Frederic Vancraeyveldt for the report.
parser.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/parser.c b/parser.c
index e3d750eb1..f11ad51fe 100644
--- a/parser.c
+++ b/parser.c
@@ -3487,10 +3487,10 @@ xmlParseNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *other) {
while (*in != 0 && *in == *cmp) {
++in;
++cmp;
- ctxt->input->col++;
}
if (*cmp == 0 && (*in == '>' || IS_BLANK_CH (*in))) {
/* success */
+ ctxt->input->col += in - ctxt->input->cur;
ctxt->input->cur = in;
return (const xmlChar*) 1;
}
@@ -8820,6 +8820,7 @@ xmlParseQNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *name,
}
if (*cmp == 0 && (*in == '>' || IS_BLANK_CH (*in))) {
/* success */
+ ctxt->input->col += in - ctxt->input->cur;
ctxt->input->cur = in;
return((const xmlChar*) 1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]