Remember to fill in new char's.
...we seriously need to use a standard <string>. *glares at Yaniel*
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user