diff --git a/extensions/Particle3D/ParticleUniverse/CCPUParticle3DMaterialManager.cpp b/extensions/Particle3D/ParticleUniverse/CCPUParticle3DMaterialManager.cpp index b5374d8167..11a0777e30 100644 --- a/extensions/Particle3D/ParticleUniverse/CCPUParticle3DMaterialManager.cpp +++ b/extensions/Particle3D/ParticleUniverse/CCPUParticle3DMaterialManager.cpp @@ -179,8 +179,8 @@ bool PUParticle3DMaterialCache::loadMaterialsFromSearchPaths( const std::string continue; } - std::string fullpath = fileFolder + "/" + ent->d_name; - if (strlen(ent->d_name) > 9 && strcmp(".material", ent->d_name + strlen(ent->d_name) - 9)) + std::string fullpath = fileFolder + "/" + file->d_name; + if (strlen(file->d_name) > 9 && strcmp(".material", file->d_name + strlen(file->d_name) - 9)) { CCLOG("%s", fullpath.c_str()); loadMaterials(fullpath);