From 448f71583124a19806ab55999154b1232d74a5fe Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 3 Oct 2008 19:53:53 +0000 Subject: [PATCH] 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 --- src/Changes.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Changes.cpp b/src/Changes.cpp index cbdbc269f6..685e69b0ee 100644 --- a/src/Changes.cpp +++ b/src/Changes.cpp @@ -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()) {