diff options
-rw-r--r-- | core/dive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/dive.c b/core/dive.c index 3b3ad762d..1ecfb923f 100644 --- a/core/dive.c +++ b/core/dive.c @@ -3562,7 +3562,7 @@ int split_dive(struct dive *dive) // the surface start. if (!surface_start) continue; - if (!should_split(dc, dc->sample[surface_start].time.seconds, sample[i - 1].time.seconds)) + if (!should_split(dc, dc->sample[surface_start].time.seconds, sample[-1].time.seconds)) continue; return split_dive_at(dive, surface_start, i-1); |