diff options
Diffstat (limited to 'core/planner.c')
-rw-r--r-- | core/planner.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/planner.c b/core/planner.c index a0ab34cf0..8d1cbdc60 100644 --- a/core/planner.c +++ b/core/planner.c @@ -426,8 +426,9 @@ static struct gaschanges *analyze_gaslist(struct diveplan *diveplan, int *gascha struct gaschanges *gaschanges = NULL; struct divedatapoint *dp = diveplan->dp; int best_depth = displayed_dive.cylinder[*asc_cylinder].depth.mm; + bool total_time_zero = true; while (dp) { - if (dp->time == 0) { + if (dp->time == 0 && total_time_zero) { if (dp->depth <= depth) { int i = 0; nr++; @@ -449,6 +450,8 @@ static struct gaschanges *analyze_gaslist(struct diveplan *diveplan, int *gascha *asc_cylinder = dp->cylinderid; } } + } else { + total_time_zero = false; } dp = dp->next; } |