summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-11-11 16:57:15 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-11 17:22:18 +0100
commit7fc1213aab23d50395c322d4f590f5cf18d43d3b (patch)
tree0d3ab3ba2ace41694e017338b3f6f40a3d53d28f /profile.c
parent9e2b8edb4d73efa5504ce5d99de3eec7a3967ab7 (diff)
downloadsubsurface-7fc1213aab23d50395c322d4f590f5cf18d43d3b.tar.gz
Add back mysteriously deleted "} else {" line
Commit 6c52e8a2e516 ("Add plotting of the deco ceiling") for some totally unexplained reason deleted one "else" statement, resulting in some plot events not having a time at all. Which causes various really odd issues if you hit that situation, including divide-by-zero etc due to the difference in times between events being nonsensical. It's just some odd mistake that was entirely unrelated to the other changes in that commit. Add the missing line back in. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index ecec7bb8f..d4369d97f 100644
--- a/profile.c
+++ b/profile.c
@@ -1727,6 +1727,7 @@ static struct plot_info *create_plot_info(struct dive *dive, int nr_samples, str
if (ev->time.seconds == sample->time.seconds - 1) {
entry->sec = ev->time.seconds - 1;
(entry+1)->sec = ev->time.seconds;
+ } else {
entry->sec = ev->time.seconds;
(entry+1)->sec = ev->time.seconds + 1;
}