From 3f47ac3fe2b0af17e71cc7ddd1aa0c0bcf8de3bc Mon Sep 17 00:00:00 2001 From: kimmi Date: Tue, 17 Jul 2012 21:48:03 +0000 Subject: [PATCH] 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 --- code/ObjTools.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/ObjTools.h b/code/ObjTools.h index d40241ef0..41de3f61f 100644 --- a/code/ObjTools.h +++ b/code/ObjTools.h @@ -172,6 +172,10 @@ inline char_t getName( char_t it, char_t end, std::string &name ) ++it; // 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) ); if ( strName.empty() ) return it;