Browse Source

PlyParser: fix invalid loading when comment is empty.

emvivre 9 years ago
parent
commit
93be0f69da
1 changed files with 4 additions and 1 deletions
  1. 4 1
      code/PlyParser.cpp

+ 4 - 1
code/PlyParser.cpp

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