summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-08-27 15:29:40 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-08-27 15:29:40 -0700
commit9cf961249e197d6d8a3656968ce15dfd19e3ef3b (patch)
tree92676f36bb7fa383a5fcee21fdad0d8c9dd79a16 /parse-xml.c
parent6500e943c18a416b4f628a963d067ee977da48ba (diff)
downloadsubsurface-9cf961249e197d6d8a3656968ce15dfd19e3ef3b.tar.gz
Fix an issue with trips that have dives from multiple input files
The existing code didn't handle the case of different trips for the same date coming from different sources. It also got confused if the first dive processed (which is, chronologically, the last dive) happened to be a "NOTRIP" dive. This commit adds a bit of debugging infrastructure for the trip handling, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-xml.c b/parse-xml.c
index 00538dad9..b70f15444 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -41,7 +41,7 @@ void record_dive(struct dive *dive)
void record_trip(struct dive *trip)
{
- dive_trip_list = INSERT_TRIP(trip, dive_trip_list);
+ dive_trip_list = insert_trip(trip, dive_trip_list);
}
static void delete_dive_renumber(struct dive **dives, int i, int nr)