From 93be0f69dacaeb0fe377290e8920feb93afd7666 Mon Sep 17 00:00:00 2001 From: emvivre Date: Thu, 10 Mar 2016 17:47:07 +0100 Subject: [PATCH] PlyParser: fix invalid loading when comment is empty. --- code/PlyParser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/PlyParser.cpp b/code/PlyParser.cpp index df7d6883b..5b6a35e5f 100644 --- a/code/PlyParser.cpp +++ b/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;