summaryrefslogtreecommitdiff
path: root/ao-tools
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-06-21 11:44:32 -0700
committerKeith Packard <keithp@keithp.com>2010-06-21 11:44:32 -0700
commit5933eaa44fe45027b856f1303dd657b974eb53e7 (patch)
treeae8ea9901b47ebcb01a29b25e808a816b95e50f1 /ao-tools
parent11d155d558d0b121b66f089adee0a47d71f65a78 (diff)
ao-postflight: was walking off state.data array
Diffstat (limited to 'ao-tools')
-rw-r--r--ao-tools/ao-postflight/ao-postflight.c2
1 files changed, 1 insertions, 1 deletions
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);