Commit b426f83a authored by hybrid's avatar hybrid

Avoid registering archives twice.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2303 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 2e00d39f
...@@ -152,6 +152,13 @@ bool CFileSystem::registerFileArchive(const core::string<c16>& filename, bool ig ...@@ -152,6 +152,13 @@ bool CFileSystem::registerFileArchive(const core::string<c16>& filename, bool ig
bool ret = false; bool ret = false;
u32 i; u32 i;
// check if the archive was already loaded
for (i = 0; i < FileArchives.size(); ++i)
{
if (filename == FileArchives[i]->getArchiveName())
return true;
}
// try to load archive based on file name // try to load archive based on file name
for (i = 0; i < ArchiveLoader.size(); ++i) for (i = 0; i < ArchiveLoader.size(); ++i)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment