The case \n\r does not exist and will prevent from reading correctly a binary ply generated on linux if accidentally the first byte of the binary data is 0x0D (the ASCII code of \r)...
So lines 59->66
if (c == '\n') {
// if possible consume another '\r'
int peek = stream.read();
if (peek != '\r' && peek >= 0){
stream.unread(peek);
}
break;
}
should be changed to:
if (c == '\n') {
break;
}
The case \n\r does not exist and will prevent from reading correctly a binary ply generated on linux if accidentally the first byte of the binary data is 0x0D (the ASCII code of \r)...
So lines 59->66
if (c == '\n') {
// if possible consume another '\r'
int peek = stream.read();
if (peek != '\r' && peek >= 0){
stream.unread(peek);
}
break;
}
should be changed to:
if (c == '\n') {
break;
}