Skip to content

Commit

Permalink
VirtualConsole: use memmove for an overlapping copy
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs authored and awesomekling committed Dec 20, 2019
1 parent b6ee8a2 commit 0a10462
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Kernel/TTY/VirtualConsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ void VirtualConsole::scroll_up()
clear_vga_row(24);
}
} else {
memcpy(m_buffer, m_buffer + 160, 160 * 24);
memmove(m_buffer, m_buffer + 160, 160 * 24);
u16* linemem = (u16*)&m_buffer[24 * 160];
for (u16 i = 0; i < columns(); ++i)
linemem[i] = 0x0720;
Expand Down

0 comments on commit 0a10462

Please sign in to comment.