summaryrefslogtreecommitdiff
path: root/driver_ubx.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver_ubx.c')
-rw-r--r--driver_ubx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver_ubx.c b/driver_ubx.c
index 127f410f..6038b558 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -175,7 +175,7 @@ ubx_msg_nav_timegps(struct gps_device_t *session, unsigned char *buf,
tow = (unsigned int)getleul(buf, 0);
gw = (unsigned int)getlesw(buf, 8);
if (gw > session->context->gps_week)
- session->context->gps_week = gw;
+ session->context->gps_week = (unsigned short)gw;
flags = (unsigned int)getub(buf, 11);
if ((flags & 0x7) != 0)