terminal: Check bounds of cursor position

Thanks @cproc for the fix.
This commit is contained in:
Norman Feske 2013-03-22 15:24:29 +01:00
parent c36909e5dc
commit e1d0839e19
1 changed files with 4 additions and 0 deletions

View File

@ -134,6 +134,10 @@ class Cell_array
void cursor(Terminal::Position pos, bool enable, bool mark_dirty = false)
{
if (((unsigned)pos.x >= _num_cols) ||
((unsigned)pos.y >= _num_lines))
return;
CELL &cell = _array[pos.y][pos.x];
if (enable)