summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--divelist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/divelist.c b/divelist.c
index 8dac63f34..08f47121c 100644
--- a/divelist.c
+++ b/divelist.c
@@ -1035,7 +1035,7 @@ static dive_trip_t *find_trip_by_idx(int idx)
if (idx >= 0)
return NULL;
-
+ idx = -idx;
while (trip) {
if (trip->index == idx)
return trip;