[hackers] [st] fix segfault with mouse selection. (thx anonymous) || Aurélien Aptel

From: <hg_AT_suckless.org>
Date: Thu, 9 Jun 2011 14:27:28 +0200 (CEST)

changeset: 205:76d7ec4d159e
tag: tip
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Thu Jun 09 14:27:07 2011 +0200
files: st.c
description:
fix segfault with mouse selection. (thx anonymous)

diff -r 6c311c25323e -r 76d7ec4d159e st.c
--- a/st.c Wed Jun 08 21:35:58 2011 +0200
+++ b/st.c Thu Jun 09 14:27:07 2011 +0200
@@ -615,7 +615,7 @@
                 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));
                 }
         }
 }
Received on Thu Jun 09 2011 - 14:27:28 CEST

This archive was generated by hypermail 2.2.0 : Thu Jun 09 2011 - 14:36:06 CEST