mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:53:23 +00:00
Make sure init_decompression works for dive 0 as well
The loop would actually get entered for dive 0 and try to compare things with dive -1. Which of course fails. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b94a93d061
commit
c8a9986451
1 changed files with 1 additions and 1 deletions
|
@ -858,7 +858,7 @@ double init_decompression(struct dive *dive)
|
||||||
;
|
;
|
||||||
when = dive->when;
|
when = dive->when;
|
||||||
i = divenr;
|
i = divenr;
|
||||||
while (--i) {
|
while (i && --i) {
|
||||||
struct dive* pdive = get_dive(i);
|
struct dive* pdive = get_dive(i);
|
||||||
/* we don't want to mix dives from different trips as we keep looking
|
/* we don't want to mix dives from different trips as we keep looking
|
||||||
* for how far back we need to go */
|
* for how far back we need to go */
|
||||||
|
|
Loading…
Add table
Reference in a new issue