aboutsummaryrefslogtreecommitdiffstats
path: root/templatelayout.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2015-09-20 15:10:31 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-20 15:10:31 -0700
commit4d9d4825a56d8291b77a55c977b34190d0fb3b31 (patch)
treecb3ba7c230e3dcea1bc82904ab7e8df0b808d37f /templatelayout.h
parent04773705e3037900c9389fce6cca1db05cc6db30 (diff)
downloadsubsurface-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 'templatelayout.h')
0 files changed, 0 insertions, 0 deletions