From 5638a4ca099ec3dc884328133fba4c6cd3dceaf8 Mon Sep 17 00:00:00 2001
From: zachir <zachir@librem.one>
Date: Sun, 26 Feb 2023 00:51:39 -0600
Subject: actually fix reflow issue (was + sizeof and not *)

---
 st.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

(limited to 'st.c')

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);
 }
-- 
cgit v1.2.3