diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-18 12:48:15 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-18 13:01:08 -0800 |
commit | ed11851ae3053e146bafb45ecfc48b2520ba8bb1 (patch) | |
tree | 10bc943f9f2dce5a9728c6e7469dc3648aed839a /uemis-downloader.c | |
parent | 0a8038dba48ffbde57292436fae54640a50347dc (diff) | |
download | subsurface-ed11851ae3053e146bafb45ecfc48b2520ba8bb1.tar.gz |
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>
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r-- | uemis-downloader.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c index 22d3bdc7d..4a9f4272b 100644 --- a/uemis-downloader.c +++ b/uemis-downloader.c @@ -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; } |