瀏覽代碼

fix non skipped CR in header parsing

Matthias Möller 4 年之前
父節點
當前提交
7534b149cf
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      code/AssetLib/Ply/PlyParser.cpp

+ 2 - 1
code/AssetLib/Ply/PlyParser.cpp

@@ -419,7 +419,8 @@ bool PLY::DOM::ParseHeader(IOStreamBuffer<char> &streamBuffer, std::vector<char>
         if (PLY::Element::ParseElement(streamBuffer, buffer, &out)) {
         if (PLY::Element::ParseElement(streamBuffer, buffer, &out)) {
             // add the element to the list of elements
             // add the element to the list of elements
             alElements.push_back(out);
             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
             // we have reached the end of the header
             break;
             break;
         } else {
         } else {