Fixed incorrect access of new lines in AddEmptyLines(). The wrong

lines would be initialized while the right ones might have remained
uninitialized. Could happen only in case that more lines were
scrolled out of the screen than there were in the scroll region.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25985 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-06-17 01:37:05 +00:00
parent 9035d0e247
commit dfa76786b3

View File

@ -207,7 +207,8 @@ HistoryBuffer::AddEmptyLines(int32 count)
= (AttributesRun*)(fBuffer + fBufferAllocationOffset);
for (int32 i = 0; i < count; i++) {
HistoryLine* line = _LineAt(fNextLine++);
HistoryLine* line = &fLines[fNextLine];
fNextLine = (fNextLine + 1) % fCapacity;
line->attributesRuns = attributesRun;
line->attributesRunCount = 0;
line->byteLength = 0;