diff --git a/code/BaseImporter.cpp b/code/BaseImporter.cpp index 20321d0ad..3d53bc089 100644 --- a/code/BaseImporter.cpp +++ b/code/BaseImporter.cpp @@ -136,14 +136,17 @@ void BaseImporter::GetExtensionList(std::set& extensions) } // ------------------------------------------------------------------------------------------------ -/*static*/ bool BaseImporter::SearchFileHeaderForToken(IOSystem* pIOHandler, +/*static*/ bool BaseImporter::SearchFileHeaderForToken( IOSystem* pIOHandler, const std::string& pFile, const char** tokens, unsigned int numTokens, unsigned int searchBytes /* = 200 */, bool tokensSol /* false */) { - ai_assert(NULL != tokens && 0 != numTokens && 0 != searchBytes); + ai_assert( NULL != tokens ); + ai_assert( 0 != numTokens ); + ai_assert( 0 != searchBytes); + if (!pIOHandler) return false; @@ -178,8 +181,6 @@ void BaseImporter::GetExtensionList(std::set& extensions) for (unsigned int i = 0; i < numTokens;++i) { ai_assert(NULL != tokens[i]); - - const char* r = strstr(buffer,tokens[i]); if( !r ) { continue;