mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-05-04 02:17:45 +02:00
Fixed error handling
This commit is contained in:
parent
f4765d0c48
commit
46a9fffb8a
@ -86,11 +86,13 @@ int ISO8211::readDR(QVector<FieldDefinition> &fields)
|
||||
return -1;
|
||||
|
||||
r.tag = qFromLittleEndian<quint32>(tag);
|
||||
r.pos = offset + Util::str2int(fieldPos.constData(), posSize);
|
||||
r.pos = Util::str2int(fieldPos.constData(), posSize);
|
||||
r.size = Util::str2int(fieldLen.constData(), lenSize);
|
||||
|
||||
if (r.pos < 0 || r.size < 0)
|
||||
return -1;
|
||||
|
||||
r.pos += offset;
|
||||
}
|
||||
|
||||
return len;
|
||||
|
Loading…
x
Reference in New Issue
Block a user