Fix PR comments

Update CR and LF symbols skipping at the end of the line
This commit is contained in:
Vladimir Petrigo 2022-05-22 16:01:09 +03:00 committed by GitHub
parent 69ec986af7
commit f75678a426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,8 +79,13 @@ bool minmea_check(const char *sentence, bool strict)
}
// The only stuff allowed at this point is a newline.
if (*sentence && strcmp(sentence, "\n") != 0 && strcmp(sentence, "\r") != 0 && strcmp(sentence, "\r\n") != 0)
while (*sentence == '\r' || *sentence == '\n') {
sentence++;
}
if (*sentence) {
return false;
}
return true;
}