diff --git a/minmea.c b/minmea.c index e9361cc..e43ee99 100644 --- a/minmea.c +++ b/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; diff --git a/tests.c b/tests.c index 90a935e..8e135e0 100644 --- a/tests.c +++ b/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",