Przeglądaj źródła

- 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
aramis_acg 13 lat temu
rodzic
commit
53665faacf
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      code/BaseImporter.cpp

+ 5 - 1
code/BaseImporter.cpp

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