From ce547d3060308419da77465e122db437d7be056b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Aptel?= Date: Thu, 9 Jun 2011 14:27:07 +0200 Subject: [PATCH] fix segfault with mouse selection. (thx anonymous) --- st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.c b/st.c index b331ead..df8353a 100644 --- a/st.c +++ b/st.c @@ -615,7 +615,7 @@ bmotion(XEvent *e) { if(oldey != sel.ey || oldex != sel.ex) { int starty = MIN(oldey, sel.ey); int endy = MAX(oldey, sel.ey); - drawregion(0, (starty > 0 ? starty : 0), term.col, (sel.ey < term.row ? endy+1 : term.row)); + drawregion(0, (starty > 0 ? starty : 0), term.col, (endy < term.row ? endy+1 : term.row)); } } }