Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Fix segmentation fault in strhandle()
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
5e92db2
..
f9aba90
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-2268,8
+2268,7
@@
strhandle(void) {
term.esc &= ~(ESC_STR_END|ESC_STR);
strparse();
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 */
switch(strescseq.type) {
case ']': /* OSC -- Operating System Command */