diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2013-04-22 07:00:40 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-23 20:47:48 -0700 |
commit | 2d0473f6f534e69eaae784724bd7d4d347b15d0a (patch) | |
tree | 6fbc3466079bb02127176af040e6d87ba2ad7c0b /dive.c | |
parent | ee0025f69687af08347de738dcd2d2dc9ebc6365 (diff) | |
download | subsurface-2d0473f6f534e69eaae784724bd7d4d347b15d0a.tar.gz |
Retain event sort order on restart
The events that had same time stamp were reversed in order on every new
load of the log file. This patch will keep the order static. (Changing
order is annoying when using version control to store the logs.)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -25,7 +25,7 @@ void add_event(struct divecomputer *dc, int time, int type, int flags, int value p = &dc->events; /* insert in the sorted list of events */ - while (*p && (*p)->time.seconds < time) + while (*p && (*p)->time.seconds <= time) p = &(*p)->next; ev->next = *p; *p = ev; |