Fix FIT entry engine checksum (#189)

This commit is contained in:
serg-pushkarev 2020-01-20 03:18:15 +03:00 committed by vit9696
parent 2ef8d770e4
commit 516949a6e6

View File

@ -3668,7 +3668,6 @@ USTATUS FfsParser::parseFit(const UModelIndex & index)
// Calculate FIT entry checksum // Calculate FIT entry checksum
UByteArray tempFIT = model->body(fitIndex).mid(fitOffset, fitSize); UByteArray tempFIT = model->body(fitIndex).mid(fitOffset, fitSize);
FIT_ENTRY* tempFitHeader = (FIT_ENTRY*)tempFIT.data(); FIT_ENTRY* tempFitHeader = (FIT_ENTRY*)tempFIT.data();
tempFitHeader->CsFlag = 0;
tempFitHeader->Checksum = 0; tempFitHeader->Checksum = 0;
UINT8 calculated = calculateChecksum8((const UINT8*)tempFitHeader, fitSize); UINT8 calculated = calculateChecksum8((const UINT8*)tempFitHeader, fitSize);
if (calculated != fitHeader->Checksum) { if (calculated != fitHeader->Checksum) {