mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Improve handling for old XML files in Uemis downloader
In order to work in the most expected ways for people who have used a version of Subsurface that didn't store the deviceid in the divecomputer we relax the testing for when a divecomputer entry is assumed to match the current divecomputer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0a8038dba4
commit
ed11851ae3
1 changed files with 2 additions and 1 deletions
|
@ -735,7 +735,8 @@ static char *get_divenr(char *deviceidstr)
|
|||
struct divecomputer *dc = &dive_table.dives[i]->dc;
|
||||
while (dc) {
|
||||
if (dc->model && !strcmp(dc->model, "Uemis Zurich") &&
|
||||
dc->deviceid == deviceid && dc->diveid > maxdiveid)
|
||||
(dc->deviceid == 0 || dc->deviceid == 0x7fffffff || dc->deviceid == deviceid) &&
|
||||
dc->diveid > maxdiveid)
|
||||
maxdiveid = dc->diveid;
|
||||
dc = dc->next;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue