summaryrefslogtreecommitdiff
path: root/nmea_parse.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-02-11 22:20:34 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-02-11 22:20:34 +0000
commit9bdbad051fce6fcc62e44b86d46bd36c378278c8 (patch)
treeccfab1ae5046c476f3e20d8f3947345775a3bf79 /nmea_parse.c
parent37340fcfd3b6b44a1c762e3a518aa4d04d305439 (diff)
downloadgpsd-9bdbad051fce6fcc62e44b86d46bd36c378278c8.tar.gz
Avoid a GPGLL core dump (again!).
Diffstat (limited to 'nmea_parse.c')
-rw-r--r--nmea_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nmea_parse.c b/nmea_parse.c
index 78861be6..c1aef48a 100644
--- a/nmea_parse.c
+++ b/nmea_parse.c
@@ -209,7 +209,7 @@ static void processGPGLL(int count, char *field[], struct gps_data_t *out)
do_lat_lon(&field[1], out);
fake_mmddyyyy(out);
merge_hhmmss(field[5], out);
- if (*status == 'D')
+ if (count >= 8 && *status == 'D')
newstatus = STATUS_DGPS_FIX; /* differential */
else
newstatus = STATUS_FIX;