* paragraph_pimpl.C: eraseChars: assert "end >= start"

rather than "end > start"; eraseChars is invoked
	in cases in which no character is to be deleted


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15856 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Michael Schmitt 2006-11-11 14:50:21 +00:00
parent 7e7d28a0ca
commit 579fc0972f

View File

@ -337,7 +337,7 @@ bool Paragraph::Pimpl::eraseChar(pos_type pos, bool trackChanges)
int Paragraph::Pimpl::eraseChars(pos_type start, pos_type end, bool trackChanges) int Paragraph::Pimpl::eraseChars(pos_type start, pos_type end, bool trackChanges)
{ {
BOOST_ASSERT(start >= 0 && start <= size()); BOOST_ASSERT(start >= 0 && start <= size());
BOOST_ASSERT(end > start && end <= size() + 1); BOOST_ASSERT(end >= start && end <= size() + 1);
pos_type i = start; pos_type i = start;
for (pos_type count = end - start; count; --count) { for (pos_type count = end - start; count; --count) {