From e5ad8934d81865aa3c428617299731a4614b6481 Mon Sep 17 00:00:00 2001 From: Matt Goodrich Date: Thu, 4 Jun 2020 14:43:11 -0400 Subject: [PATCH] Bugfix for parseCoord --- src/NMEA_parse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NMEA_parse.cpp b/src/NMEA_parse.cpp index 7e9e71e..eaa5bfd 100644 --- a/src/NMEA_parse.cpp +++ b/src/NMEA_parse.cpp @@ -682,7 +682,7 @@ bool Adafruit_GPS::parseCoord(char *pStart, nmea_float_t *angleDegrees, char *p = pStart; if (!isEmpty(p)) { // get the number in DDDMM.mmmm format and break into components - char degreebuff[10]; + char degreebuff[10] = {0}; // Ensure string is terminated after strncpy char *e = strchr(p, '.'); if (e == NULL || e - p > 6) return false; // no decimal point in range