=== modified file 'strings/xml.c' --- strings/xml.c 2012-12-14 11:16:06 +0000 +++ strings/xml.c 2013-07-13 02:21:08 +0000 @@ -550,10 +550,12 @@ { const char *beg=p->beg; const char *s; - for ( s=p->beg ; scur; s++) + for ( s=p->cur - 1 ; s>p->beg - 1; s--) { - if (s[0] == '\n') + if (s[0] == '\n') { beg=s; + break; + } } return (size_t) (p->cur-beg); }