1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-19 09:21:30 +03:00

more tolerant Buffer::string

This commit is contained in:
Maxime Coste 2013-06-27 23:49:34 +02:00
parent b1f31d2e12
commit 5b4ef23b9d

View File

@ -129,7 +129,7 @@ LineCount Buffer::line_count() const
String Buffer::string(const BufferCoord& begin, const BufferCoord& end) const
{
String res;
for (LineCount line = begin.line; line <= end.line; ++line)
for (auto line = begin.line; line <= end.line and line < line_count(); ++line)
{
ByteCount start = 0;
if (line == begin.line)