mirror of
https://github.com/adafruit/Adafruit_GPS.git
synced 2026-07-28 04:08:15 +00:00
Bugfix for parseCoord
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user