diff options
-rw-r--r-- | st.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -1535,11 +1535,6 @@ tclearregion(int x1, int y1, int x2, int y2, int usecurattr) int x, y, temp; Glyph *gp; - if (x1 > x2) - temp = x1, x1 = x2, x2 = temp; - if (y1 > y2) - temp = y1, y1 = y2, y2 = temp; - /* regionselected() takes relative coordinates */ if (regionselected(x1+term.scr, y1+term.scr, x2+term.scr, y2+term.scr)) selremove(); @@ -1566,7 +1561,7 @@ tdeletechar(int n) if (size > 0) { /* otherwise src would point beyond the array https://stackoverflow.com/questions/29844298 */ line = term.line[term.c.y]; - memmove(&line[dst], &line[src], size + sizeof(Glyph)); + memmove(&line[dst], &line[src], size * sizeof(Glyph)); } tclearregion(dst + size, term.c.y, term.col - 1, term.c.y, 1); } |