summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-02-26 00:51:39 -0600
committerzachir <zachir@librem.one>2023-02-26 00:51:39 -0600
commit5638a4ca099ec3dc884328133fba4c6cd3dceaf8 (patch)
treebc13ad6a4afb8e915c8b94e61d6f20502e9c1044
parent608bf8df44115d818bc3cba0861abcb7b24494a5 (diff)
actually fix reflow issue (was + sizeof and not *)0.9.2
-rw-r--r--st.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/st.c b/st.c
index 0bad5c4..f98ec34 100644
--- a/st.c
+++ b/st.c
@@ -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);
}