mirror of
https://github.com/LukeSmithxyz/st.git
synced 2024-11-21 23:05:59 +01:00
Fixing a bug while parsing empty arguments in csiparse.
This commit is contained in:
parent
7d32471eff
commit
1aa26b4ecd
1 changed files with 2 additions and 2 deletions
4
st.c
4
st.c
|
@ -1295,7 +1295,6 @@ tnewline(int first_col) {
|
|||
|
||||
void
|
||||
csiparse(void) {
|
||||
/* int noarg = 1; */
|
||||
char *p = csiescseq.buf, *np;
|
||||
long int v;
|
||||
|
||||
|
@ -1306,9 +1305,10 @@ csiparse(void) {
|
|||
}
|
||||
|
||||
while(p < csiescseq.buf+csiescseq.len) {
|
||||
np = NULL;
|
||||
v = strtol(p, &np, 10);
|
||||
if(np == p)
|
||||
break;
|
||||
v = 0;
|
||||
if(v == LONG_MAX || v == LONG_MIN)
|
||||
v = -1;
|
||||
csiescseq.arg[csiescseq.narg++] = v;
|
||||
|
|
Loading…
Reference in a new issue