Commit 9213d932 authored by deuce's avatar deuce
Browse files

memmove() for overlapping memory.

parent b421a4f9
......@@ -822,7 +822,7 @@ delete_tabstop(struct cterminal *cterm, int pos)
for (i = 0; i < cterm->tab_count && cterm->tabs[i] <= pos; i++) {
if (cterm->tabs[i] == pos) {
memcpy(&cterm->tabs[i], &cterm->tabs[i+1], (cterm->tab_count - i - 1) * sizeof(cterm->tabs[0]));
memmove(&cterm->tabs[i], &cterm->tabs[i+1], (cterm->tab_count - i - 1) * sizeof(cterm->tabs[0]));
cterm->tab_count--;
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment