mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-01 23:20:55 +00:00
terminal: Check bounds of cursor position
Thanks @cproc for the fix.
This commit is contained in:
parent
c36909e5dc
commit
e1d0839e19
@ -134,6 +134,10 @@ class Cell_array
|
|||||||
|
|
||||||
void cursor(Terminal::Position pos, bool enable, bool mark_dirty = false)
|
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];
|
CELL &cell = _array[pos.y][pos.x];
|
||||||
|
|
||||||
if (enable)
|
if (enable)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user