Re: [xml] xmlGetLineNo() always returns 0 for XML_TEXT_NODE



At 13:39 07.07.2008, Daniel Veillard wrote:

can you check the enclosed patch fixes it for you ? 

I checked some more and noticed that your patch suggests

  if (ctxt->input != NULL)
    ret->line = ctxt->input->line;

where similar assignments in SAX2.c use

  if (ctxt->linenumbers) {
  if (ctxt->input != NULL) {
      if (ctxt->input->line < 65535)
    ret->line = (short) ctxt->input->line;
      else
          ret->line = 65535;

Shouldn't the fix be just like this, especially because it takes care not to overflow ret->line ?

Ralf 




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