diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-10-16 21:35:59 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-10-16 13:57:00 -0700 |
commit | 23dc56e9cc3847f48a08c041a3d15fa007e58906 (patch) | |
tree | cf219f35e36464366cfff243d555a91b6d09bc29 | |
parent | 2e5913d2ba6c5b5c384121692045be52836ac6fa (diff) | |
download | subsurface-23dc56e9cc3847f48a08c041a3d15fa007e58906.tar.gz |
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>
-rw-r--r-- | core/import-csv.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |