mirror of https://github.com/axmolengine/axmol.git
Merge pull request #4273 from boyu0/fix_ccbreader_magic_bits_compare_bug
[ci skip]fix CCBReader magic bytes compare bug.
This commit is contained in:
commit
8b5068d4c5
|
@ -387,7 +387,7 @@ bool CCBReader::readHeader()
|
||||||
int magicBytes = *((int*)(this->_bytes + this->_currentByte));
|
int magicBytes = *((int*)(this->_bytes + this->_currentByte));
|
||||||
this->_currentByte += 4;
|
this->_currentByte += 4;
|
||||||
|
|
||||||
if(CC_SWAP_INT32_LITTLE_TO_HOST(magicBytes) != (*reinterpret_cast<const int*>("ccbi"))) {
|
if(CC_SWAP_INT32_BIG_TO_HOST(magicBytes) != (*reinterpret_cast<const int*>("ccbi"))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue