mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Fixed broken subdivs parsing
This commit is contained in:
parent
7c838331c2
commit
78703f3651
@ -235,6 +235,9 @@ bool TREFile::load(int idx)
|
|||||||
totalSubdivs += _levels.at(i).subdivs;
|
totalSubdivs += _levels.at(i).subdivs;
|
||||||
quint32 extendedSubdivs = _extended.size / _extended.itemSize;
|
quint32 extendedSubdivs = _extended.size / _extended.itemSize;
|
||||||
quint32 diff = totalSubdivs - extendedSubdivs + 1;
|
quint32 diff = totalSubdivs - extendedSubdivs + 1;
|
||||||
|
if (skip < diff)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (!seek(hdl, _extended.offset + (skip - diff) * _extended.itemSize))
|
if (!seek(hdl, _extended.offset + (skip - diff) * _extended.itemSize))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user