diff options
-rw-r--r-- | core/parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/parse.c b/core/parse.c index f54d36742..6f12736a8 100644 --- a/core/parse.c +++ b/core/parse.c @@ -243,10 +243,6 @@ void dive_start(struct parser_state *state) state->cur_dive = alloc_dive(); reset_dc_info(&state->cur_dive->dc, state); memset(&state->cur_tm, 0, sizeof(state->cur_tm)); - if (state->cur_trip) { - add_dive_to_trip(state->cur_dive, state->cur_trip); - state->cur_dive->tripflag = IN_TRIP; - } state->o2pressure_sensor = 1; } @@ -258,6 +254,10 @@ void dive_end(struct parser_state *state) free_dive(state->cur_dive); else record_dive_to_table(state->cur_dive, state->target_table); + if (state->cur_trip) { + add_dive_to_trip(state->cur_dive, state->cur_trip); + state->cur_dive->tripflag = IN_TRIP; + } state->cur_dive = NULL; state->cur_dc = NULL; state->cur_location.lat.udeg = 0; |