diff --git a/gps.cpp b/gps.cpp index c7445ef..328c2bd 100644 --- a/gps.cpp +++ b/gps.cpp @@ -154,7 +154,7 @@ char GPSGSM::getPar(char *str_long, char *str_lat, char *str_alt, char *str_time void parseTime(char *field, int *time) { ////////////////Time//////////// - char tmp[4]; + char tmp[5]; tmp[2]=0; // Init tmp and null terminate tmp[0] = field[8]; tmp[1] = field[9]; @@ -200,4 +200,4 @@ double convertLong(char* longString) double min = longitude - (100 * deg); // work out the number of minutes longitude = deg + (double) min/60.00; // convert to decimal format return longitude; -} \ No newline at end of file +}