diff --git a/src/conio/cterm.c b/src/conio/cterm.c
index e6f6d01674891e9f78a01dd4c7be9d2a77aed0b6..ed377853a1f63b142dae8e6187d74e6e23d28b9f 100644
--- a/src/conio/cterm.c
+++ b/src/conio/cterm.c
@@ -2636,28 +2636,26 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int *
 						case 'c':
 							/* SyncTERM Device Attributes */
 							if (seq->param_str[0] == '<' && parse_parameters(seq)) {
+								seq_default(seq, 0, 0);
 								tmp[0] = 0;
-								for (i=0; i<seq->param_count; i++) {
-									seq_default(seq, i, 0);
-									switch (seq->param_int[i]) {
-										case 0:		/* Advanced features */
-											strcpy(tmp, "\x1b[<0");
-											if (cio_api.options & CONIO_OPT_LOADABLE_FONTS)
-												strcat(tmp, ";1");
-											if (cio_api.options & CONIO_OPT_BRIGHT_BACKGROUND)
-												strcat(tmp, ";2");
-											if (cio_api.options & CONIO_OPT_PALETTE_SETTING)
-												strcat(tmp, ";3");
-											if (cio_api.options & CONIO_OPT_SET_PIXEL)
-												strcat(tmp, ";4");
-											if (cio_api.options & CONIO_OPT_FONT_SELECT)
-												strcat(tmp, ";5");
-											if (cio_api.options & CONIO_OPT_EXTENDED_PALETTE)
-												strcat(tmp, ";6");
-											if (cio_api.mouse)
-												strcat(tmp, ";7");
-											strcat(tmp, "c");
-									}
+								switch (seq->param_int[0]) {
+									case 0:		/* Advanced features */
+										strcpy(tmp, "\x1b[<0");
+										if (cio_api.options & CONIO_OPT_LOADABLE_FONTS)
+											strcat(tmp, ";1");
+										if (cio_api.options & CONIO_OPT_BRIGHT_BACKGROUND)
+											strcat(tmp, ";2");
+										if (cio_api.options & CONIO_OPT_PALETTE_SETTING)
+											strcat(tmp, ";3");
+										if (cio_api.options & CONIO_OPT_SET_PIXEL)
+											strcat(tmp, ";4");
+										if (cio_api.options & CONIO_OPT_FONT_SELECT)
+											strcat(tmp, ";5");
+										if (cio_api.options & CONIO_OPT_EXTENDED_PALETTE)
+											strcat(tmp, ";6");
+										if (cio_api.mouse)
+											strcat(tmp, ";7");
+										strcat(tmp, "c");
 								}
 								if(retbuf && *tmp && strlen(retbuf) + strlen(tmp) < retsize)
 									strcat(retbuf, tmp);