From 0c309acbe7e0e517926af081d4f0f25001507080 Mon Sep 17 00:00:00 2001 From: boyu0 Date: Fri, 15 Nov 2013 15:41:43 +0800 Subject: [PATCH] fix CCBReader magic bytes compare bug which cause CocosBuilderTest turns black --- cocos/editor-support/cocosbuilder/CCBReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/editor-support/cocosbuilder/CCBReader.cpp b/cocos/editor-support/cocosbuilder/CCBReader.cpp index baf81a6f55..bf566770fe 100644 --- a/cocos/editor-support/cocosbuilder/CCBReader.cpp +++ b/cocos/editor-support/cocosbuilder/CCBReader.cpp @@ -387,7 +387,7 @@ bool CCBReader::readHeader() int magicBytes = *((int*)(this->_bytes + this->_currentByte)); this->_currentByte += 4; - if(CC_SWAP_INT32_LITTLE_TO_HOST(magicBytes) != (*reinterpret_cast("ccbi"))) { + if(CC_SWAP_INT32_BIG_TO_HOST(magicBytes) != (*reinterpret_cast("ccbi"))) { return false; }