Merge pull request #819 from emvivre/master

PlyParser: fix invalid loading when comment is empty.
pull/821/head
Kim Kulling 2016-03-11 13:40:27 +01:00
commit 8872e96183
1 changed files with 4 additions and 1 deletions

View File

@ -419,8 +419,11 @@ bool PLY::DOM::SkipComments (const char* pCur,
if (!SkipSpaces(pCur,&pCur))return false; if (!SkipSpaces(pCur,&pCur))return false;
if (TokenMatch(pCur,"comment",7)) if (TokenMatch(pCur,"comment",7))
{
if ( !IsLineEnd(pCur[-1]) )
{ {
SkipLine(pCur,&pCur); SkipLine(pCur,&pCur);
}
SkipComments(pCur,&pCur); SkipComments(pCur,&pCur);
*pCurOut = pCur; *pCurOut = pCur;
return true; return true;