We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfa197f commit b33e367Copy full SHA for b33e367
Terminal/Terminal.cpp
@@ -418,6 +418,8 @@ Rect Terminal::row_rect(word row)
418
419
inline Terminal::Attribute& Terminal::attribute_at(word row, word column)
420
{
421
+ ASSERT(row < m_rows);
422
+ ASSERT(column < m_columns);
423
return m_attributes[(row * m_columns) + column];
424
}
425
@@ -440,7 +442,7 @@ void Terminal::paint()
440
442
scanlines_to_copy * m_pixel_width
441
443
);
444
m_need_full_invalidation = true;
- attribute_at(m_cursor_row - m_rows_to_scroll_backing_store, m_cursor_column).dirty = true;
445
+ attribute_at(max(0, m_cursor_row - m_rows_to_scroll_backing_store), m_cursor_column).dirty = true;
446
447
m_rows_to_scroll_backing_store = 0;
448
#endif
0 commit comments