Remember to fill in new char's.

...we seriously need to use a standard <string>.

*glares at Yaniel*
This commit is contained in:
Jason Felds
2015-09-26 21:03:46 -04:00
parent d878a44a9b
commit 537af8d866
5 changed files with 30 additions and 16 deletions
+1
View File
@@ -455,6 +455,7 @@ RString ReadString( RageFileBasic &f, int iSize, RString &sError )
return RString();
char *buf = new char[iSize];
std::fill(buf, buf + iSize, '\0');
FileReading::ReadBytes( f, buf, iSize, sError );
RString ret(buf);
delete [] buf;