1
0
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:
Martin Tůma 2022-04-08 00:23:45 +02:00
parent e3582cc5cf
commit 8bc91c760a

View File

@ -170,12 +170,12 @@ bool NODFile::linkInfo(Handle &hdl, const BlockInfo &blockInfo, quint32 linkId,
if (!bs.read(s1 - s2, linkInfo.linkOffset))
return false;
linkInfo.linkOffset += blockInfo.hdr.linkInfoOffsetBase;
}
if (!bs.read(s2, linkInfo.nodeOffset))
return false;
linkInfo.nodeOffset = (blockInfo.offset - linkInfo.nodeOffset)
>> _nodeShift;
if (!bs.read(s2, linkInfo.nodeOffset))
return false;
linkInfo.nodeOffset = (blockInfo.offset - linkInfo.nodeOffset)
>> _nodeShift;
}
return true;
}