complain about bad getChar()s

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6467 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2003-03-12 18:06:49 +00:00
parent 3a0cf18603
commit 42464c437a
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-03-12 John Levon <levon@movementarian.org>
* paragraph_pimpl.C: complain about bad getChar()s
for a while at least
2003-03-12 John Levon <levon@movementarian.org> 2003-03-12 John Levon <levon@movementarian.org>
* buffer.h: * buffer.h:

View File

@ -260,8 +260,12 @@ Paragraph::value_type Paragraph::Pimpl::getChar(pos_type pos) const
//Assert(pos < size()); //Assert(pos < size());
// Then this has no meaning. (Lgb) // Then this has no meaning. (Lgb)
if (!siz || pos == siz) if (!siz || pos == siz) {
lyxerr << "getChar() on pos " << pos << " in par id "
<< owner_->id() << " of size " << siz
<< " is a bit silly !" << endl;
return '\0'; return '\0';
}
return text[pos]; return text[pos];
} }