summaryrefslogtreecommitdiff
path: root/timebase.c
diff options
context:
space:
mode:
Diffstat (limited to 'timebase.c')
-rw-r--r--timebase.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/timebase.c b/timebase.c
index f9c61d56..8787d1f4 100644
--- a/timebase.c
+++ b/timebase.c
@@ -135,7 +135,7 @@ void gpsd_set_century(struct gps_device_t *session)
cp = session->packet.outbuffer + 5;
while (isspace(*cp))
--cp;
- year = strtod((char *)cp, &end);
+ year = (int)strtol((char *)cp, &end, 10);
session->context->century = year - (year % 100);
}
}