Skip to content
Snippets Groups Projects
Commit 5bf71f1a authored by rswindell's avatar rswindell
Browse files

Fix Query Extended State information request (CSI=...n), broken in rev 1.162:

no responses were being sent for a couple of different reasons (misplaced break
and erroneous check of strcmp result).
parent b4a9b00d
No related branches found
No related tags found
No related merge requests found
......@@ -1083,7 +1083,7 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int *
if(retbuf == NULL)
break;
tmp[0] = 0;
if ((strcmp(cterm->escbuf,"[=n") == 0) || (strcmp(cterm->escbuf,"[=1n"))) {
if ((strcmp(cterm->escbuf,"[=n") == 0) || (strcmp(cterm->escbuf,"[=1n") == 0)) {
sprintf(tmp, "\x1b[=1;%u;%u;%u;%u;%u;%un"
,CONIO_FIRST_FREE_FONT
,(uint8_t)cterm->setfont_result
......@@ -1093,7 +1093,7 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int *
,(uint8_t)cterm->altfont[3]
);
}
if (!strcmp(cterm->escbuf,"[=2n")) {
else if (!strcmp(cterm->escbuf,"[=2n")) {
int vidflags = GETVIDEOFLAGS();
strcpy(tmp, "\x1b[=2");
if(cterm->origin_mode)
......@@ -1116,7 +1116,6 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int *
strcat(tmp, ";");
}
strcat(tmp, "n");
break;
}
if(*tmp && strlen(retbuf) + strlen(tmp) < retsize)
strcat(retbuf, tmp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment