diff options
author | Maurice Quennet <mjq@gmx.net> | 2013-09-21 23:33:56 +0200 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2013-09-23 19:26:24 +0200 |
commit | eeae9b0ceef9e2fec4cb4f1132748c302e5ac702 (patch) | |
tree | 0f978698c1eea736668808edf9ee8573dbf105c3 /st.c | |
parent | 8ac0a5f872b0024bab161fa020126013724758ba (diff) |
Fix core in multi-line selection on OpenBSD
OpenBSD 5.3 amd64 release version with the most current st
version from git, crash and dump core when selecting multiple
lines whith the cursor. This happens, because on line 964
of st.c (gp-1)->mode is accessed, although gp is still
pointing at the beginning of the array term.line[y] (see
line 939 for initialization of gp).
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -962,7 +962,7 @@ selcopy(void) { * st. * FIXME: Fix the computer world. */ - if(y < sel.ne.y && !((gp-1)->mode & ATTR_WRAP)) + if(y < sel.ne.y && x > 0 && !((gp-1)->mode & ATTR_WRAP)) *ptr++ = '\n'; /* |