mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
Desktop: fix index in weightsystems_equal()
The weightsystem_equal() function compares weightsystems of two dives to decide whether the "commit changes" message should be shown and to decide which dives are edited when changing multiple dives. Due to an index mixup the function returned wrong results for more than two weightsystems. Fix it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9485ace709
commit
999a63a5bb
1 changed files with 1 additions and 1 deletions
|
@ -674,7 +674,7 @@ bool weightsystems_equal(const dive *d1, const dive *d2)
|
|||
if (d1->weightsystems.nr != d2->weightsystems.nr)
|
||||
return false;
|
||||
for (int i = 0; i < d1->weightsystems.nr; ++i) {
|
||||
if (!same_weightsystem(d1->weightsystems.weightsystems[0], d2->weightsystems.weightsystems[i]))
|
||||
if (!same_weightsystem(d1->weightsystems.weightsystems[i], d2->weightsystems.weightsystems[i]))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue