diff options
-rw-r--r-- | core/dive.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/dive.c b/core/dive.c index 950f4b336..d75de418e 100644 --- a/core/dive.c +++ b/core/dive.c @@ -253,7 +253,8 @@ enum dive_comp_type get_current_divemode(struct divecomputer *dc, int time, stru ev = dc ? dc->events : NULL; } while (ev && ev->time.seconds < time) { - *divemode = (enum dive_comp_type) ev->value; + if (ev != dc->events) + *divemode = (enum dive_comp_type) ev->value; ev = get_next_event(ev->next, "modechange"); } *evp = ev; |