GCC: Fixed compilation warning

This commit is contained in:
Sour 2020-02-27 21:31:12 -05:00
parent 51818dc867
commit 31630ad04d

View file

@ -35,7 +35,7 @@ bool CodeDataLogger::LoadCdlFile(string cdlFilepath, bool autoResetCdl, uint32_t
constexpr int headerSize = 9; //"CDLv2" + 4-byte CRC32 value
if(memcmp(cdlData.data(), "CDLv2", 5) == 0) {
uint32_t savedCrc = cdlData[5] | (cdlData[6] << 8) | (cdlData[7] << 16) | (cdlData[8] << 24);
if(autoResetCdl && savedCrc != romCrc || fileSize < _prgSize + headerSize) {
if((autoResetCdl && savedCrc != romCrc) || fileSize < _prgSize + headerSize) {
memset(_cdlData, 0, _prgSize);
} else {
memcpy(_cdlData, cdlData.data() + headerSize, _prgSize);