ReadToEnd method of CTextFileReader returns a string, which is oversized because of extra '\0' symbols at its end. It seems ok when you don't try to insert it in the middle of another string. In this case the result string will be cropped.
Environment
Win32 (Win10) / Visual Studio 2017
Steps to reproduce the issue
//...
E_RESULT_CODE result;
ITextFileReader* pFileReader = mpFileSystem->Create("filename", result);
std::string textFileData = pFileReader->ReadToEnd();
std::string testString = "this is a test string, which you've never seen!";
std::string result = textFileData + testString;
/* will contain "{textFileData}\0\0...\0"this is a test string, which you've never seen!" */
//...
What's the expected result?
The result that is generated with ReadToEnd should not contain '\0' at all.
What's the actual result?
The result of ReadToEnd contains a few extra '\0' at its end.
Bug report
ReadToEnd method of CTextFileReader returns a string, which is oversized because of extra '\0' symbols at its end. It seems ok when you don't try to insert it in the middle of another string. In this case the result string will be cropped.
Environment
Win32 (Win10) / Visual Studio 2017
Steps to reproduce the issue
What's the expected result?
The result that is generated with ReadToEnd should not contain '\0' at all.
What's the actual result?
The result of ReadToEnd contains a few extra '\0' at its end.