summaryrefslogtreecommitdiff
path: root/driver_garmin_txt.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-19 08:48:36 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-19 08:48:36 -0500
commitce0258511c9d04f7afa3c46b8dcb4d6108d2148e (patch)
treeb80c9f779baa54b26d4be5d4805cba9ed28fb168 /driver_garmin_txt.c
parent468d2ad0f276b02dd131a574c087f8a797300c2a (diff)
downloadgpsd-ce0258511c9d04f7afa3c46b8dcb4d6108d2148e.tar.gz
Use the century slot in the context structure.
Duh. I previously implemented it and iniitialized it prperly, then forgot to actually use it instead of CENTURY_BASE. Soon this will matter because I'm going to implement some heuristics for limited trust in the system clock.
Diffstat (limited to 'driver_garmin_txt.c')
-rw-r--r--driver_garmin_txt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver_garmin_txt.c b/driver_garmin_txt.c
index 6e50c2e6..6675d001 100644
--- a/driver_garmin_txt.c
+++ b/driver_garmin_txt.c
@@ -292,7 +292,7 @@ gps_mask_t garmintxt_parse(struct gps_device_t * session)
if (0 != gar_int_decode(buf + 0, 2, 0, 99, &result))
break;
session->driver.garmintxt.date.tm_year =
- (CENTURY_BASE + (int)result) - 1900;
+ (session->context->century + (int)result) - 1900;
/* month */
if (0 != gar_int_decode(buf + 2, 2, 1, 12, &result))
break;