aboutsummaryrefslogtreecommitdiffstats
path: root/core/save-html.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/save-html.c')
-rw-r--r--core/save-html.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/save-html.c b/core/save-html.c
index ea46d49ea..ec5751453 100644
--- a/core/save-html.c
+++ b/core/save-html.c
@@ -408,7 +408,8 @@ void write_trip(struct membuffer *b, dive_trip_t *trip, int *dive_no, bool selec
char *separator = "";
bool found_sel_dive = 0;
- for (dive = trip->dives; dive != NULL; dive = dive->next) {
+ for (int i = 0; i < trip->dives.nr; i++) {
+ dive = trip->dives.dives[i];
if (!dive->selected && selected_only)
continue;