parser.c: fixed line number reporting on error

Daniel
This commit is contained in:
Daniel Veillard 2001-03-26 22:52:16 +00:00
parent 04be4f51e4
commit 505821145f
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Tue Mar 27 00:51:27 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* parser.c: fixed line number reporting on error
Mon Mar 26 23:21:41 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* parser.c: Sullivan and Darin found a parser bug,

View File

@ -384,7 +384,7 @@ xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) {
*/
int
xmlParseCharRef(xmlParserCtxtPtr ctxt) {
int val = 0;
unsigned int val = 0;
int count = 0;
if (ctxt->token != 0) {
@ -2438,6 +2438,8 @@ void
xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) {
const xmlChar *in;
int nbchar = 0;
int line = ctxt->input->line;
int col = ctxt->input->col;
SHRINK;
GROW;
@ -2491,6 +2493,8 @@ xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) {
} while ((*in >= 0x20) && (*in <= 0x7F));
nbchar = 0;
}
ctxt->input->line = line;
ctxt->input->col = col;
xmlParseCharDataComplex(ctxt, cdata);
}