浏览代码

minmea: Allow lines with only CR ending

Vladimir Petrigo 6 年之前
父节点
当前提交
69ec986af7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      minmea.c

+ 1 - 1
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;