From 360174e3cf235b796292267533541e1a7dafcd18 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Tue, 13 Aug 2019 23:47:58 -0400 Subject: Stop parsing CSI params when cap is hit --- term.c | 3 +-- 1 file changed, 1 insertion(+), 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'; -- cgit 1.4.1