summaryrefslogtreecommitdiff
path: root/libgps_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-02-25 10:38:55 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-02-25 10:38:55 -0500
commit94babafb7d08f9a4d3b7b0cb425c856ff06a5764 (patch)
tree04b226a426403fe2d7de525b4919e62028df317c /libgps_json.c
parent06e375b14076ed399a80527904c8aac2723338f8 (diff)
downloadgpsd-94babafb7d08f9a4d3b7b0cb425c856ff06a5764.tar.gz
Fix a bug in computation of satellites_visible.
Charles Curley pointed this one out on Mon Feb 7 00:40:04 CET 2011 and enclosed a patch. All regression tests pass.
Diffstat (limited to 'libgps_json.c')
-rw-r--r--libgps_json.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libgps_json.c b/libgps_json.c
index aec7f3b7..8a0629ea 100644
--- a/libgps_json.c
+++ b/libgps_json.c
@@ -219,8 +219,10 @@ static int json_sky_read(const char *buf, struct gps_data_t *gpsdata,
/*@ +fullinitblock @*/
int status, i, j;
- for (i = 0; i < MAXCHANNELS; i++)
+ for (i = 0; i < MAXCHANNELS; i++) {
+ gpsdata->PRN[i] = 0;
usedflags[i] = false;
+ }
status = json_read_object(buf, json_attrs_2, endptr);
if (status != 0)