Merge pull request #250 from songchengjiang/v3

fix the bug of material reading on linux
This commit is contained in:
XiaoYang 2015-03-09 17:40:33 +08:00
commit b0b8ae1112
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ bool PUMaterialCache::loadMaterialsFromSearchPaths( const std::string &fileFolde
}
std::string fullpath = fileFolder + "/" + file->d_name;
if (strlen(file->d_name) > 9 && strcmp(".material", file->d_name + strlen(file->d_name) - 9))
if (strlen(file->d_name) > 9 && (strcmp(".material", file->d_name + strlen(file->d_name) - 9) == 0))
{
CCLOG("%s", fullpath.c_str());
loadMaterials(fullpath);