mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Only read the node offset when it is actually present
This commit is contained in:
parent
e3582cc5cf
commit
8bc91c760a
@ -170,12 +170,12 @@ bool NODFile::linkInfo(Handle &hdl, const BlockInfo &blockInfo, quint32 linkId,
|
|||||||
if (!bs.read(s1 - s2, linkInfo.linkOffset))
|
if (!bs.read(s1 - s2, linkInfo.linkOffset))
|
||||||
return false;
|
return false;
|
||||||
linkInfo.linkOffset += blockInfo.hdr.linkInfoOffsetBase;
|
linkInfo.linkOffset += blockInfo.hdr.linkInfoOffsetBase;
|
||||||
}
|
|
||||||
|
|
||||||
if (!bs.read(s2, linkInfo.nodeOffset))
|
if (!bs.read(s2, linkInfo.nodeOffset))
|
||||||
return false;
|
return false;
|
||||||
linkInfo.nodeOffset = (blockInfo.offset - linkInfo.nodeOffset)
|
linkInfo.nodeOffset = (blockInfo.offset - linkInfo.nodeOffset)
|
||||||
>> _nodeShift;
|
>> _nodeShift;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user