mirror of
https://github.com/ole00/afterburner.git
synced 2024-12-01 20:49:27 +00:00
PC app: fix prompt detection.
It should improve detection of Afterburner presence during start.
This commit is contained in:
parent
6beae4de9c
commit
b498bc73f3
@ -609,8 +609,8 @@ static void closeSerial(void) {
|
|||||||
|
|
||||||
static int checkPromptExists(char* buf, int bufSize) {
|
static int checkPromptExists(char* buf, int bufSize) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < bufSize && buf[i] != 0; i++) {
|
for (i = 0; i < bufSize - 2 && buf[i] != 0; i++) {
|
||||||
if (buf[i] == '>') {
|
if (buf[i] == '>' && buf[i+1] == '\r' && buf[i+2] == '\n') {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user