Inform user if there was no dive profile in DL7/ZXU file

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
Miika Turkia 2017-09-11 07:06:56 +03:00 committed by Dirk Hohndel
parent f3ab2ee674
commit e25cecf37c

View file

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