From 23dc56e9cc3847f48a08c041a3d15fa007e58906 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 16 Oct 2020 21:35:59 +0200 Subject: parser: fix parsing of DAN files The last two parameters of the parse_dan_format() function were mixed up: sites should come before filter_presets. This should have caused crashes, for DAN files with dive sites. I don't understand why this didn't cause compiler warnings. Signed-off-by: Berthold Stoeger --- core/import-csv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/import-csv.c b/core/import-csv.c index ab5353109..846c397d7 100644 --- a/core/import-csv.c +++ b/core/import-csv.c @@ -104,8 +104,8 @@ static char *parse_dan_new_line(char *buf, const char *NL) static int try_to_xslt_open_csv(const char *filename, struct memblock *mem, const char *tag); static int parse_dan_format(const char *filename, char **params, int pnr, struct dive_table *table, - struct trip_table *trips, filter_preset_table_t *filter_presets, - struct dive_site_table *sites) + struct trip_table *trips, struct dive_site_table *sites, + filter_preset_table_t *filter_presets) { int ret = 0, i; size_t end_ptr = 0; -- cgit v1.2.3-70-g09d2