st
simple terminal
git clone https://9o.is/git/st.git
commit 2558b480d2db203ed8997e266af24b88c91ee994 parent ef834a2ea28b3a4573ca20b678850fdcc501df07 Author: Christoph Lohmann <20h@r-36.net> Date: Tue, 26 Feb 2013 19:07:23 +0100 Fixing a bug while parsing empty arguments in csiparse. Diffstat:
| M | st.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/st.c b/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;