console: linenoiseProbe: check if response is valid

This commit is contained in:
Данила Горнушко 2023-11-24 00:47:18 +03:00
parent bd68a7d453
commit 3423bbc5ea

View file

@ -1206,6 +1206,10 @@ int linenoiseProbe() {
if (cb < 0) {
continue;
}
if (read_bytes == 0 && c != '\x1b') {
/* invalid response */
break;
}
read_bytes += cb;
}
/* Restore old mode */