since I updated my Irrlicht fork to the latest Irrlicht from the ogles branch I get an "invalid read" when testing with valgrind in the CPLYMeshFileLoader:
Here's the diff:
Code: Select all
@@ -571,7 +572,7 @@ c8* CPLYMeshFileLoader::getNextLine()
StartPointer = LineEndPointer + 1;
// crlf split across buffer move
- if (StartPointer<EndPointer && *StartPointer == '\n')
+ if (*StartPointer == '\n')^M
{
*StartPointer = '\0';
++StartPointer;
@@ -582,7 +583,7 @@ c8* CPLYMeshFileLoader::getNextLine()
while (pos < EndPointer && *pos && *pos != '\r' && *pos != '\n')
++pos;
- if ( (pos+1) < EndPointer && ( *(pos+1) == '\r' || *(pos+1) == '\n') )
+ if ( pos < EndPointer && ( *(pos+1) == '\r' || *(pos+1) == '\n') )^M
{
*pos = '\0';
++pos;