From 5933eaa44fe45027b856f1303dd657b974eb53e7 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 21 Jun 2010 11:44:32 -0700 Subject: [PATCH] ao-postflight: was walking off state.data array --- ao-tools/ao-postflight/ao-postflight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ao-tools/ao-postflight/ao-postflight.c b/ao-tools/ao-postflight/ao-postflight.c index bf427d3b..e5b55665 100644 --- a/ao-tools/ao-postflight/ao-postflight.c +++ b/ao-tools/ao-postflight/ao-postflight.c @@ -587,7 +587,7 @@ analyse_flight(struct cc_flightraw *f, FILE *summary_file, FILE *detail_file, (f->gps.data[i].time - boost_start) / 100.0, nsat); fprintf(kml_file, "%s", buf); - if (state_idx + 1 <= f->state.num && f->state.data[state_idx + 1].time <= f->gps.data[i].time) { + if (state_idx + 1 < f->state.num && f->state.data[state_idx + 1].time <= f->gps.data[i].time) { state_idx++; if (f->state.data[state_idx - 1].value != f->state.data[state_idx].value) { fprintf(kml_file, "%s", kml_placemark_end); -- 2.30.2