diff options
author | Christoph Lohmann <20h@r-36.net> | 2013-02-26 19:07:23 +0100 |
---|---|---|
committer | Christoph Lohmann <20h@r-36.net> | 2013-02-26 19:07:23 +0100 |
commit | 1aa26b4ecd68e6071d36e9103aa9c21711bbf6ea (patch) | |
tree | 3e615ec4717ad092a90c150b46004cf72243ab9d /st.c | |
parent | 7d32471efffa825f52d24930b5ee617105f9c83e (diff) |
Fixing a bug while parsing empty arguments in csiparse.
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |