From deb312b2934d8b526c161702d755cc8a6f8ea3ca Mon Sep 17 00:00:00 2001 From: Rick Sellens Date: Wed, 29 Jan 2020 19:52:13 -0500 Subject: [PATCH] Clear thisSentence and thisSource at start of each check that way previous sentence identifiers won't bleed through on failure. --- src/NMEA_parse.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NMEA_parse.cpp b/src/NMEA_parse.cpp index 942d198..97d603a 100644 --- a/src/NMEA_parse.cpp +++ b/src/NMEA_parse.cpp @@ -545,6 +545,7 @@ bool Adafruit_GPS::parse(char *nmea) { /**************************************************************************/ boolean Adafruit_GPS::check(char *nmea) { thisCheck = 0; // new check + *thisSentence = *thisSource = 0; if (*nmea != '$' && *nmea != '!') return false; // doesn't start with $ or ! else