mirror of
https://github.com/alrayyes/st.git
synced 2024-11-26 12:56:22 +00:00
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).
This commit is contained in:
parent
8ac0a5f872
commit
eeae9b0cee
1 changed files with 1 additions and 1 deletions
2
st.c
2
st.c
|
@ -962,7 +962,7 @@ selcopy(void) {
|
||||||
* st.
|
* st.
|
||||||
* FIXME: Fix the computer world.
|
* 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';
|
*ptr++ = '\n';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue