diff options
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r-- | uemis-downloader.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c index 797704c66..5d8b07c01 100644 --- a/uemis-downloader.c +++ b/uemis-downloader.c @@ -795,13 +795,12 @@ static char *uemis_get_divenr(char *deviceidstr) deviceid = atoi(deviceidstr); struct dive *d; for_each_dive (i, d) { - struct divecomputer *dc = &d->dc; - while (dc) { + struct divecomputer *dc; + for_each_dc(d, dc) { if (dc->model && !strcmp(dc->model, "Uemis Zurich") && (dc->deviceid == 0 || dc->deviceid == 0x7fffffff || dc->deviceid == deviceid) && dc->diveid > maxdiveid) maxdiveid = dc->diveid; - dc = dc->next; } } snprintf(divenr, 10, "%d", maxdiveid); |