summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--term.c3
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';