diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-02-25 10:38:55 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-02-25 10:38:55 -0500 |
commit | 94babafb7d08f9a4d3b7b0cb425c856ff06a5764 (patch) | |
tree | 04b226a426403fe2d7de525b4919e62028df317c /libgps_json.c | |
parent | 06e375b14076ed399a80527904c8aac2723338f8 (diff) | |
download | gpsd-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.c | 4 |
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) |