minmea: Allow lines with only CR ending

This commit is contained in:
Vladimir Petrigo 2018-12-21 11:37:59 +03:00 committed by GitHub
parent ae4dd9442a
commit 69ec986af7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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