Fixing a bug while parsing empty arguments in csiparse.
Christoph Lohmann 20h@r-36.net
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
st.c
→
st.c
@@ -1295,7 +1295,6 @@ }
void csiparse(void) { - /* int noarg = 1; */ char *p = csiescseq.buf, *np; long int v;@@ -1306,9 +1305,10 @@ p++;
} 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;