libnmea icon indicating copy to clipboard operation
libnmea copied to clipboard

Make escape chars validation optional

Open BigNocciolino opened this issue 2 years ago • 0 comments

My problem

Since i have all the nmea sentences in a .txt file, one sentence in a row, the escape chars are not in plain text, so the sentence validation fails.

I am accessing the file like this:

char sentence[NMEA_MAX_LENGTH] = {0};

while(fgets(sentence, sizeof(sentence), nema_file) != NULL) {
    // Validate and do some stuff
}

My solution

My solution is simply to make the check for escape chars optional.

I also modified all the test cases to match this new change, and added a new test-case to validate a sentence without escape chars 99c5b94ec6b755f21f4e45e342cc5a055de3e3fa

BigNocciolino avatar Aug 10 '22 17:08 BigNocciolino