Fix assertion with imaginary end-of-par in Changes::addToToc().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26701 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-10-03 19:53:53 +00:00
parent 5a4059e74b
commit 448f715831

View File

@ -411,7 +411,10 @@ void Changes::addToToc(DocIterator const & cdit, Buffer const & buffer) const
break;
}
dit.pos() = it->range.start;
str += " " + dit.paragraph().asString(it->range.start, it->range.end);
Paragraph const & par = dit.paragraph();
str += " " + par.asString(it->range.start, max(par.size(), it->range.end));
// FIXME: find an unicode character for carriage return presentation if
// present; i.e. when it->range.end > par.size()
docstring const & author = author_list.get(it->change.author).name();
Toc::iterator it = change_list.item(0, author);
if (it == change_list.end()) {