Update cocos2dx/platform/ios/CCFileUtils.mm

fix the problem when calling CCFileUtils::sharedFileUtils()->getFileData("a.png") doesn't work.
This commit is contained in:
Michael Ding 2013-01-18 09:27:22 +11:00
parent 822dde27ef
commit 088e568c8e
1 changed files with 2 additions and 1 deletions

View File

@ -272,7 +272,8 @@ unsigned char* CCFileUtils::getFileData(const char* pszFileName, const char* psz
do
{
// read the file from hardware
FILE *fp = fopen(pszFileName, pszMode);
std::string fullPath = fullPathFromRelativePath(pszFileName);
FILE *fp = fopen(fullPath.c_str(), pszMode);
CC_BREAK_IF(!fp);
fseek(fp,0,SEEK_END);