mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
Uemis downloader: handle yet another corner case
If we looking for dive details and are trying to guess the offset between object_id and logfilenr, we need to treat logfilenr 0 as special - it means we read past the end of the list of stored dives and need to walk backwards. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
491ef7edc8
commit
eb0ccace77
1 changed files with 1 additions and 1 deletions
|
@ -1185,7 +1185,7 @@ static bool get_matching_dive(int idx, char *newmax, int *uemis_mem_status, stru
|
|||
char *logfilenr = strstr(mbuf, "logfilenr");
|
||||
if (logfilenr) {
|
||||
sscanf(logfilenr, "logfilenr{int{%u", &nr_found);
|
||||
if (nr_found >= dive->dc.diveid) {
|
||||
if (nr_found >= dive->dc.diveid || nr_found == 0) {
|
||||
found_above = true;
|
||||
dive_to_read = dive_to_read - 2;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue