Bugfix for UD 0.1.0

- use of destroyed object due, local copy needed
This commit is contained in:
Nikolaj Schlej 2016-07-09 11:26:26 +02:00
parent 4381bc6103
commit 31fe6c7620

View File

@ -35,7 +35,8 @@ USTATUS FitParser::parse(const UModelIndex & index, const UModelIndex & lastVtfI
model->setFixed(index, true);
// Special case of FIT header
const FIT_ENTRY* fitHeader = (const FIT_ENTRY*)(model->body(fitIndex).constData() + fitOffset);
UByteArray fitBody = model->body(fitIndex);
const FIT_ENTRY* fitHeader = (const FIT_ENTRY*)(fitBody.constData() + fitOffset);
// Check FIT checksum, if present
UINT32 fitSize = (fitHeader->Size & 0xFFFFFF) << 4;