Browse Source

Fixing a bug while parsing empty arguments in csiparse.

master
Christoph Lohmann 12 years ago
parent
commit
1aa26b4ecd
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      st.c

+ 2
- 2
st.c View File

@ -1295,7 +1295,6 @@ tnewline(int first_col) {
void void
csiparse(void) { csiparse(void) {
/* int noarg = 1; */
char *p = csiescseq.buf, *np; char *p = csiescseq.buf, *np;
long int v; long int v;
@ -1306,9 +1305,10 @@ csiparse(void) {
} }
while(p < csiescseq.buf+csiescseq.len) { while(p < csiescseq.buf+csiescseq.len) {
np = NULL;
v = strtol(p, &np, 10); v = strtol(p, &np, 10);
if(np == p) if(np == p)
break;
v = 0;
if(v == LONG_MAX || v == LONG_MIN) if(v == LONG_MAX || v == LONG_MIN)
v = -1; v = -1;
csiescseq.arg[csiescseq.narg++] = v; csiescseq.arg[csiescseq.narg++] = v;


Loading…
Cancel
Save