From 94babafb7d08f9a4d3b7b0cb425c856ff06a5764 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 25 Feb 2011 10:38:55 -0500 Subject: 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. --- libgps_json.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libgps_json.c') 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) -- cgit v1.2.1