浏览代码

PlyParser: fix invalid loading when comment is empty.

emvivre 9 年之前
父节点
当前提交
93be0f69da
共有 1 个文件被更改,包括 4 次插入1 次删除
  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))
     if (TokenMatch(pCur,"comment",7))
     {
     {
-        SkipLine(pCur,&pCur);
+	     if ( !IsLineEnd(pCur[-1]) )
+	     {
+	         SkipLine(pCur,&pCur);
+	     }
         SkipComments(pCur,&pCur);
         SkipComments(pCur,&pCur);
         *pCurOut = pCur;
         *pCurOut = pCur;
         return true;
         return true;