mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
* 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:
parent
7e7d28a0ca
commit
579fc0972f
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user