- make BaseImporter::GetExtensionList more robust, improve error checking.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1237 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/5/head
aramis_acg 2012-04-22 22:59:47 +00:00
parent 078c1cd621
commit 53665faacf
1 changed files with 5 additions and 1 deletions

View File

@ -118,7 +118,11 @@ void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
do { do {
if (!*ext || *ext == ' ') { if (!*ext || *ext == ' ') {
extensions.insert(std::string(last,ext-last)); extensions.insert(std::string(last,ext-last));
last = ext+1; ai_assert(ext-last > 0);
last = ext;
while(*last == ' ') {
++last;
}
} }
} }
while(*ext++); while(*ext++);