Merge branch 'master' into rbsheth_fix_hunter
commit
9c207cd865
|
@ -25,7 +25,7 @@ CMakeSettings.json
|
||||||
# Output
|
# Output
|
||||||
bin/
|
bin/
|
||||||
lib/
|
lib/
|
||||||
|
x64/
|
||||||
# QtCreator
|
# QtCreator
|
||||||
CMakeLists.txt.user
|
CMakeLists.txt.user
|
||||||
|
|
||||||
|
|
|
@ -419,8 +419,7 @@ 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\r", 11) || //checks for header end with /r/n ending
|
} else if (TokenMatch(buffer, "end_header", 10)) { //checks for /n ending, if it doesn't end with /r/n
|
||||||
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 {
|
||||||
|
@ -501,6 +500,11 @@ bool PLY::DOM::ParseInstanceBinary(IOStreamBuffer<char> &streamBuffer, DOM *p_pc
|
||||||
}
|
}
|
||||||
|
|
||||||
streamBuffer.getNextBlock(buffer);
|
streamBuffer.getNextBlock(buffer);
|
||||||
|
|
||||||
|
// remove first char if it's /n in case of file with /r/n
|
||||||
|
if (((char *)&buffer[0])[0] == '\n')
|
||||||
|
buffer.erase(buffer.begin(), buffer.begin() + 1);
|
||||||
|
|
||||||
unsigned int bufferSize = static_cast<unsigned int>(buffer.size());
|
unsigned int bufferSize = static_cast<unsigned int>(buffer.size());
|
||||||
const char *pCur = (char *)&buffer[0];
|
const char *pCur = (char *)&buffer[0];
|
||||||
if (!p_pcOut->ParseElementInstanceListsBinary(streamBuffer, buffer, pCur, bufferSize, loader, p_bBE)) {
|
if (!p_pcOut->ParseElementInstanceListsBinary(streamBuffer, buffer, pCur, bufferSize, loader, p_bBE)) {
|
||||||
|
|
Loading…
Reference in New Issue