mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Initialize cylinder index
Otherwise it's possible for an uninitialized value to be used in addStop which can cause crashes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d36f056bde
commit
798965c10d
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ void DivePlannerPointsModel::loadFromDive(dive *d)
|
|||
// average samples so we end up with a total of 100 samples.
|
||||
int plansamples = dc->samples <= 100 ? dc->samples : 100;
|
||||
int j = 0;
|
||||
int cylinderid;
|
||||
int cylinderid = 0;
|
||||
for (int i = 0; i < plansamples - 1; i++) {
|
||||
while (j * plansamples <= i * dc->samples) {
|
||||
const sample &s = dc->sample[j];
|
||||
|
|
Loading…
Reference in a new issue