summaryrefslogtreecommitdiff
path: root/nmea_parse.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2007-12-25 18:41:27 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2007-12-25 18:41:27 +0000
commit0466e385867598235c9f38b5738d22541aa62e5c (patch)
treef83b053dc198fcf8dba8fb6e8611b0039b1fcd34 /nmea_parse.c
parentd96ad14cffca8d99818b29fbcbcb5ce92425ce4a (diff)
downloadgpsd-0466e385867598235c9f38b5738d22541aa62e5c.tar.gz
fix the handling of the device id
Diffstat (limited to 'nmea_parse.c')
-rw-r--r--nmea_parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nmea_parse.c b/nmea_parse.c
index 3f5199ba..5ef1f340 100644
--- a/nmea_parse.c
+++ b/nmea_parse.c
@@ -606,8 +606,9 @@ static gps_mask_t processPASHR(int c UNUSED, char *field[], struct gps_device_t
mask = ONLINE_SET;
if (0 == strcmp("RID", field[1])){ /* Receiver ID */
- (void)snprintf(session->subtype, 63 - strlen(session->subtype),
+ (void)snprintf(session->subtype, sizeof(session->subtype)-1,
"%s ver %s", field[2], field[3]);
+ return 0;
} else if (0 == strcmp("POS", field[1])){ /* 3D Position */
mask |= MODE_SET | STATUS_SET | CYCLE_START_SET;
if (0 == strlen(field[2])){