From 53665faacf2bead364faf0edaa8e74f81b53ffeb Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Sun, 22 Apr 2012 22:59:47 +0000 Subject: [PATCH] - 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 --- code/BaseImporter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/BaseImporter.cpp b/code/BaseImporter.cpp index 6fdb3b3b5..a3ed91acb 100644 --- a/code/BaseImporter.cpp +++ b/code/BaseImporter.cpp @@ -118,7 +118,11 @@ void BaseImporter::GetExtensionList(std::set& 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++);