mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Don't compare signed and unsigned values
This fixes a "reproducable hang when using "edit dive in planner" on non-planned dive". Comparing unsigned and signed integers isn't a great idea. Fixes #880 Signed-off-by: Jan Darowski <jan.darowski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
77dae89b90
commit
a524c01c3f
1 changed files with 1 additions and 1 deletions
|
@ -1028,7 +1028,7 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
|
|||
TIMESTEP, po2, &displayed_dive, prefs.decosac);
|
||||
clock += TIMESTEP;
|
||||
depth -= deltad;
|
||||
} while (depth > stoplevels[stopidx]);
|
||||
} while (depth > 0 && depth > stoplevels[stopidx]);
|
||||
|
||||
if (depth <= 0)
|
||||
break; /* We are at the surface */
|
||||
|
|
Loading…
Reference in a new issue