diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-20 15:10:31 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-20 15:10:31 -0700 |
commit | 4d9d4825a56d8291b77a55c977b34190d0fb3b31 (patch) | |
tree | cb3ba7c230e3dcea1bc82904ab7e8df0b808d37f /qt-ui/profile/ruleritem.h | |
parent | 04773705e3037900c9389fce6cca1db05cc6db30 (diff) | |
download | subsurface-4d9d4825a56d8291b77a55c977b34190d0fb3b31.tar.gz |
Fix plot entry creation
This was originally triggered by an odd merge of two dives that should
have been the same, but that showed a corner case where the plot entry
creation could create broken results that violated our assumptions about
time stamps being monotonous.
When setting up the plot entries we create surface entries at the
beginning and end. We then fill in the plot entries between them based on
the samples from the dive computer plus our own interpolation (so we have
one entry at least every ten seconds). The loop ends when we are out of
space - which in this instance caused us to exit before updating the
maxtime and therefore the final plot entries having time stamps that were
smaller than the last entry filled in by the inner loop.
This patch makes sure we have enough space in the plot entry structure and
moves the exit from the inner loop until after we have updated the
maxtime.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/ruleritem.h')
0 files changed, 0 insertions, 0 deletions