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
@ -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…
x
Reference in New Issue
Block a user