summaryrefslogtreecommitdiff
path: root/monitor_sirf.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2019-02-07 13:26:12 -0800
committerGary E. Miller <gem@rellim.com>2019-02-07 13:26:12 -0800
commit9bbfa97c7094160e28086e16019370376874482b (patch)
tree8c15e36602df03aa958411fafe762efdeec520e7 /monitor_sirf.c
parentb262e0e68816c92f6fe464a1eaf54365acd40241 (diff)
downloadgpsd-9bbfa97c7094160e28086e16019370376874482b.tar.gz
gpsmon: Don't try to convert NaN to isotime.
A drop in the buckect of the mess that is gpsmon.
Diffstat (limited to 'monitor_sirf.c')
-rw-r--r--monitor_sirf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/monitor_sirf.c b/monitor_sirf.c
index 372b528e..9f9b75b5 100644
--- a/monitor_sirf.c
+++ b/monitor_sirf.c
@@ -286,9 +286,11 @@ static void sirf_update(void)
17) / 8);
/* line 3 */
(void)wmove(mid2win, 3, 7);
- (void)wprintw(mid2win, "%-24s",
- unix_to_iso8601(session.gpsdata.fix.time, tbuf, sizeof(tbuf))
- );
+ if (isfinite(session.gpsdata.fix.time)) {
+ (void)wprintw(mid2win, "%-24s",
+ unix_to_iso8601(session.gpsdata.fix.time, tbuf,
+ sizeof(tbuf)));
+ }
(void)wmove(mid2win, 3, 38);
(void)wattrset(mid2win, A_UNDERLINE);
if (ppstime_enabled)