This website works better with JavaScript.
Home
Explore
Help
Sign In
tovi
/
st
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
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.
master
Roberto E. Vargas Caballero
10 years ago
parent
b17aa18f7c
commit
0d7448dabc
1 changed files
with
1 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-2
st.c
+ 1
- 2
st.c
View File
@ -2268,8 +2268,7 @@ strhandle(void) {
term
.
esc
&
=
~
(
ESC_STR_END
|
ESC_STR
)
;
strparse
(
)
;
narg
=
strescseq
.
narg
;
par
=
atoi
(
strescseq
.
args
[
0
]
)
;
par
=
(
narg
=
strescseq
.
narg
)
?
atoi
(
strescseq
.
args
[
0
]
)
:
0
;
switch
(
strescseq
.
type
)
{
case
'
]
'
:
/* OSC -- Operating System Command */
Write
Preview
Loading…
Cancel
Save