Kernel: Fix framebuffer bounds checks
running yes and pressing ctrl+c paniced the kernel :nekocatwoah:
This commit is contained in:
@@ -102,10 +102,9 @@ namespace Kernel
|
|||||||
|
|
||||||
void FramebufferTerminalDriver::show_cursor(bool use_data)
|
void FramebufferTerminalDriver::show_cursor(bool use_data)
|
||||||
{
|
{
|
||||||
// NOTE: cursor is allowed to be on width as scrolling only
|
if (m_cursor_x == width() || m_cursor_y == height())
|
||||||
// happens after character gets printed to next line
|
|
||||||
if (m_cursor_x == width())
|
|
||||||
return;
|
return;
|
||||||
|
ASSERT(m_cursor_x < width() && m_cursor_y < height());
|
||||||
|
|
||||||
if (!use_data)
|
if (!use_data)
|
||||||
read_cursor();
|
read_cursor();
|
||||||
|
|||||||
Reference in New Issue
Block a user