浏览代码

Bugfix : Fix an invalid getName function. Thanks to cyrilchampier.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1290 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
kimmi 13 年之前
父节点
当前提交
3f47ac3fe2
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      code/ObjTools.h

+ 4 - 0
code/ObjTools.h

@@ -172,6 +172,10 @@ inline char_t getName( char_t it, char_t end, std::string &name )
 	++it;
 	++it;
 
 
 	// Get name
 	// Get name
+	// if there is no name, and the previous char is a separator, come back to start
+	while (&(*it) < pStart) {
+		++it;
+	}
 	std::string strName( pStart, &(*it) );
 	std::string strName( pStart, &(*it) );
 	if ( strName.empty() )
 	if ( strName.empty() )
 		return it;
 		return it;