From 69ec986af735961aee47229db35a86d150f17ff2 Mon Sep 17 00:00:00 2001 From: Vladimir Petrigo Date: Fri, 21 Dec 2018 11:37:59 +0300 Subject: [PATCH] minmea: Allow lines with only CR ending --- minmea.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minmea.c b/minmea.c index 32f7881..e0e0939 100644 --- a/minmea.c +++ b/minmea.c @@ -79,7 +79,7 @@ bool minmea_check(const char *sentence, bool strict) } // 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 true;