mirror of https://github.com/axmolengine/axmol.git
Merge pull request #250 from songchengjiang/v3
fix the bug of material reading on linux
This commit is contained in:
commit
b0b8ae1112
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue