Przeglądaj źródła

Merge branch 'xiaoxiang781216-max'

Kosma Moczek 3 lat temu
rodzic
commit
a3813b8449
2 zmienionych plików z 2 dodań i 6 usunięć
  1. 0 4
      minmea.c
  2. 2 2
      tests.c

+ 0 - 4
minmea.c

@@ -46,10 +46,6 @@ bool minmea_check(const char *sentence, bool strict)
 {
     uint8_t checksum = 0x00;
 
-    // Sequence length is limited.
-    if (strlen(sentence) > MINMEA_MAX_SENTENCE_LENGTH + 3)
-        return false;
-
     // A valid sentence starts with "$".
     if (*sentence++ != '$')
         return false;

+ 2 - 2
tests.c

@@ -18,6 +18,8 @@
 
 static const char *valid_sentences_nochecksum[] = {
     "$GPTXT,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+    "$GPTXT,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+        "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
     "$GPTXT,hello\n",
     "$GPTXT,hello\r",
     "$GPTXT,hello\r\n",
@@ -51,8 +53,6 @@ static const char *valid_sentences_checksum[] = {
 };
 
 static const char *invalid_sentences[] = {
-    "$GPTXT,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-        "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
     "$GPTXT,01,01,02,ANTSTATUS=INIT*26",
     "$GPRMC,,V,,,,,,,,,,N*532",
     "$GPVTG,,,,\xff,,,,,N*30",