Undo: fix addition of multiple dives

The generic addInBatches() function is used to add batches of
contiguous sets of dives to the dive-list models. The loop
searching for the end of the batch used the wrong index and
would therefore not properly cut the batches.

Fix this.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-11-03 17:32:20 +01:00 committed by Dirk Hohndel
parent 76f38ff33b
commit a2b3d0ff06

View file

@ -717,7 +717,7 @@ void addInBatches(Vector1 &v1, const Vector2 &v2, Comparator comp, Inserter inse
// We were at end -> insert the remaining items
j = v2.size();
} else {
for (j = i + 1; j < (int)v2.size() && comp(v2[i], v1[idx]); ++j)
for (j = i + 1; j < (int)v2.size() && comp(v2[j], v1[idx]); ++j)
; // Pass
}