mirror of
https://github.com/pikami/st.git
synced 2024-11-29 15:25:42 +00:00
Fix segmentation fault in strhandle()
We cannot pass strescseq.args[0] to atoi when nargs is zero, because in this case it will be null.
This commit is contained in:
parent
b17aa18f7c
commit
0d7448dabc
3
st.c
3
st.c
@ -2268,8 +2268,7 @@ strhandle(void) {
|
|||||||
|
|
||||||
term.esc &= ~(ESC_STR_END|ESC_STR);
|
term.esc &= ~(ESC_STR_END|ESC_STR);
|
||||||
strparse();
|
strparse();
|
||||||
narg = strescseq.narg;
|
par = (narg = strescseq.narg) ? atoi(strescseq.args[0]) : 0;
|
||||||
par = atoi(strescseq.args[0]);
|
|
||||||
|
|
||||||
switch(strescseq.type) {
|
switch(strescseq.type) {
|
||||||
case ']': /* OSC -- Operating System Command */
|
case ']': /* OSC -- Operating System Command */
|
||||||
|
Loading…
Reference in New Issue
Block a user