1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 14:53:21 +02:00

Fixed error handling

This commit is contained in:
Martin Tůma 2022-11-06 14:20:19 +01:00
parent 59523f46ef
commit e1d1842fa6
2 changed files with 6 additions and 5 deletions

View File

@ -319,10 +319,5 @@ bool ISO8211::readRecord(QFile &file, Record &record)
}
}
if (file.pos() != pos + len) {
_errorString = "Record format error";
return false;
}
return true;
}

View File

@ -463,6 +463,9 @@ MapData::Poly *MapData::polyObject(const ISO8211::Record &r,
bool MapData::processRecord(const ISO8211::Record &record,
QVector<ISO8211::Record> &rv, uint &COMF, QString &name)
{
if (record.size() < 2)
return false;
const ISO8211::Field &f = record.at(1);
const QByteArray &ba = f.tag();
@ -485,6 +488,9 @@ bool MapData::processRecord(const ISO8211::Record &record,
QVector<ISO8211::Record> &fe, RecordMap &vi, RecordMap &vc, RecordMap &ve,
RecordMap &vf, uint &COMF, uint &SOMF)
{
if (record.size() < 2)
return false;
const ISO8211::Field &f = record.at(1);
const QByteArray &ba = f.tag();