Merge pull request #3929 from TinyTinni/issue_3711

Fix non skipped CR in header parsing for binary PLY
pull/3922/head^2
Kim Kulling 2021-05-29 09:29:16 +02:00 committed by GitHub
commit 9be76c1ba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -419,7 +419,8 @@ bool PLY::DOM::ParseHeader(IOStreamBuffer<char> &streamBuffer, std::vector<char>
if (PLY::Element::ParseElement(streamBuffer, buffer, &out)) {
// add the element to the list of elements
alElements.push_back(out);
} else if (TokenMatch(buffer, "end_header", 10)) {
} else if ( TokenMatch(buffer, "end_header\r", 11) || //checks for header end with /r/n ending
TokenMatch(buffer, "end_header", 10)) { //checks for /n ending, if it doesn't end with /r/n
// we have reached the end of the header
break;
} else {