diff --git a/code/COBLoader.cpp b/code/COBLoader.cpp index ac71b23ab..f1567d15c 100644 --- a/code/COBLoader.cpp +++ b/code/COBLoader.cpp @@ -91,10 +91,7 @@ bool COBImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool return true; } - else if (!extension.length() || checkSig) { - if (!pIOHandler) { - return true; - } + else if ((!extension.length() || checkSig) && pIOHandler) { const char* tokens[] = {"Caligary"}; return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1); } @@ -215,7 +212,7 @@ void ConvertTexture(boost::shared_ptr< Texture > tex, MaterialHelper* out, aiTex { const aiString path( tex->path ); out->AddProperty(&path,AI_MATKEY_TEXTURE(type,0)); - out->AddProperty(&tex->transform,sizeof(aiUVTransform)/sizeof(float),AI_MATKEY_UVTRANSFORM(type,0)); + out->AddProperty(&tex->transform,1,AI_MATKEY_UVTRANSFORM(type,0)); } // ------------------------------------------------------------------------------------------------ diff --git a/code/LWOMaterial.cpp b/code/LWOMaterial.cpp index 2ff551b99..cf76dc564 100644 --- a/code/LWOMaterial.cpp +++ b/code/LWOMaterial.cpp @@ -160,7 +160,7 @@ bool LWOImporter::HandleTextures(MaterialHelper* pcMat, const TextureList& in, a trafo.mScaling.y = (*it).wrapAmountH; BOOST_STATIC_ASSERT(sizeof(aiUVTransform)/sizeof(float) == 5); - pcMat->AddProperty((float*)&trafo,5,AI_MATKEY_UVTRANSFORM(type,cur)); + pcMat->AddProperty(&trafo,1,AI_MATKEY_UVTRANSFORM(type,cur)); } DefaultLogger::get()->debug("LWO2: Setting up non-UV mapping"); }