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++);