forked from test34/can_wizard
console: linenoiseProbe: check if response is valid
This commit is contained in:
parent
bd68a7d453
commit
3423bbc5ea
1 changed files with 4 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue