mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Uemis downloader: fix corner case
When we first get an invalid dive info and then, once we decremented the offset, get a valid one but for the wrong dive and then try to calculate the correct offset, we need to keep the existing offset in mind. What a horrid design. Thanks, UEMIS. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5702a52078
commit
f692c39ac7
1 changed files with 1 additions and 1 deletions
|
@ -919,7 +919,7 @@ const char *do_uemis_import(const char *mountpath, short force_download)
|
||||||
if (divenr == -1) {
|
if (divenr == -1) {
|
||||||
offset--;
|
offset--;
|
||||||
} else {
|
} else {
|
||||||
offset = i - divenr;
|
offset += i - divenr;
|
||||||
}
|
}
|
||||||
#if UEMIS_DEBUG & 2
|
#if UEMIS_DEBUG & 2
|
||||||
fprintf(debugfile, " -> trying again with offset %d\n", offset);
|
fprintf(debugfile, " -> trying again with offset %d\n", offset);
|
||||||
|
|
Loading…
Add table
Reference in a new issue