diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2017-09-11 07:06:56 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-09-11 07:21:43 -0700 |
commit | e25cecf37caa9d526de5dab102411798f42fd5e9 (patch) | |
tree | d602aced8e54fb9e27a49ea7c0d4a4c45953bc33 | |
parent | f3ab2ee674846ea2934de5cd6e2822cdb5143421 (diff) | |
download | subsurface-e25cecf37caa9d526de5dab102411798f42fd5e9.tar.gz |
Inform user if there was no dive profile in DL7/ZXU file
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
-rw-r--r-- | core/file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/file.c b/core/file.c index c90d394aa..874a4e2c3 100644 --- a/core/file.c +++ b/core/file.c @@ -945,6 +945,10 @@ int parse_dan_format(const char *filename, char **params, int pnr) params[pnr + 6] = NULL; ptr = strstr(ptr, "ZDP{"); + if (ptr && ptr[4] == '}') { + end_ptr += ptr - (char *)mem_csv.buffer; + return report_error(translate("gettextFromC", "No dive profile found from '%s'"), filename); + } if (ptr) ptr = strstr(ptr, NL); if (ptr) |