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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-10-16 21:35:59 +02:00 committed by Dirk Hohndel
parent 2e5913d2ba
commit 23dc56e9cc

View file

@ -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;