CCFileUtils::getFileData returns not null terminated string

When you are using CCFileUtils::getFileData such code don’t work

        unsigned long fileDataSize = 0;
    char* pData = ( char* ) pFileUtils->getFileData ( path.c_str(), "r",&fileDataSize );

    if ( pData == nullptr || fileDataSize == 0 )
    {
        assert ( false );
        return;
    }

    istringstream input ( pData);

But if you change 1 line to:

istringstream input ( string(pData, fileDataSize));

it should start working this is because pData isn’t null ended. Also in documentation that should be mentioned.