diff options
author | June McEnroe <june@causal.agency> | 2019-08-13 23:47:58 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-08-13 23:47:58 -0400 |
commit | 360174e3cf235b796292267533541e1a7dafcd18 (patch) | |
tree | 1e146464cbec1593cd09ca458c4ebd5f43b260af | |
parent | Box ICH and DCH to R-X (diff) | |
download | stream-360174e3cf235b796292267533541e1a7dafcd18.tar.gz stream-360174e3cf235b796292267533541e1a7dafcd18.zip |
Stop parsing CSI params when cap is hit
-rw-r--r-- | term.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/term.c b/term.c index 954ef32..09fe4fa 100644 --- a/term.c +++ b/term.c @@ -110,10 +110,9 @@ ACTION(csi) { static void csiParam(struct Term *t, wchar_t ch) { if (ch == L'?') { t->param.q = true; - } else if (ch == L';') { + } else if (ch == L';' && t->param.n < ParamCap) { t->param.n++; t->param.i++; - t->param.i %= ParamCap; } else if (ch >= L'0' && ch <= L'9') { t->param.s[t->param.i] *= 10; t->param.s[t->param.i] += ch - L'0'; |