summaryrefslogtreecommitdiff
path: root/gpsdclient.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2019-02-21 15:13:28 -0800
committerGary E. Miller <gem@rellim.com>2019-02-21 15:13:28 -0800
commitc40b62c5b409aa97acfa397e94dfb40198c62ea0 (patch)
tree63ad985e1efb15587eecb811cdc876d7268f93f4 /gpsdclient.c
parent83e111fa7b4467500de853b790157e75f88bb64a (diff)
downloadgpsd-c40b62c5b409aa97acfa397e94dfb40198c62ea0.tar.gz
deg_to_s(): Fix bad conversion. Add test cases.
Bug and test case by: Stephen Moshier <steve@moshier.net>
Diffstat (limited to 'gpsdclient.c')
-rw-r--r--gpsdclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsdclient.c b/gpsdclient.c
index 0c8af48e..880206ef 100644
--- a/gpsdclient.c
+++ b/gpsdclient.c
@@ -72,7 +72,7 @@ char *deg_to_str(enum deg_str_type type, double f)
/* else DD MM SS.sss */
fdsec = modf(fsec * 60, &fsec);
sec = (int)fsec;
- dsec = (int)(fdsec * 10000.0);
+ dsec = (int)(fdsec * 100000.0);
(void)snprintf(str, sizeof(str), "%3d %02d' %02d.%05d\"", deg, min, sec,
dsec);