Kernel: Fix ANSI CSI L

With my new memcpy implementation this crashed. I have no idea how this
was not crashing before :D
This commit is contained in:
Bananymous 2025-01-28 18:41:53 +02:00
parent 7fedd94cc5
commit d1c3d3d5aa
1 changed files with 2 additions and 2 deletions

View File

@ -269,8 +269,8 @@ namespace Kernel
for (uint32_t row = m_height; row > m_row; row--) for (uint32_t row = m_height; row > m_row; row--)
{ {
const uint32_t dst_y = row - 1; const uint32_t dst_y = row - 1;
const uint32_t src_y = dst_y - m_ansi_state.nums[0]; if (const uint32_t src_y = dst_y - m_ansi_state.nums[0]; src_y < dst_y)
memcpy(&m_buffer[dst_y * m_width], &m_buffer[src_y * m_width], m_width * sizeof(Cell)); memcpy(&m_buffer[dst_y * m_width], &m_buffer[src_y * m_width], m_width * sizeof(Cell));
for (uint32_t x = 0; x < m_width; x++) for (uint32_t x = 0; x < m_width; x++)
render_from_buffer(x, dst_y); render_from_buffer(x, dst_y);
} }