mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-18 00:06:15 +00:00
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>
This commit is contained in:
parent
d5af4e2ff9
commit
a727f55c67
1 changed files with 1 additions and 1 deletions
2
dive.c
2
dive.c
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue