Fix keysounds (and other WAV files).

Bloody off by one error.
This commit is contained in:
Jason Felds
2015-10-08 17:13:33 -04:00
parent 0b52c51eab
commit e0b32ad3db
+2 -2
View File
@@ -454,8 +454,8 @@ RString ReadString( RageFileBasic &f, int iSize, RString &sError )
if( sError.size() != 0 )
return RString();
char *buf = new char[iSize];
std::fill(buf, buf + iSize, '\0');
char *buf = new char[iSize + 1];
std::fill(buf, buf + iSize + 1, '\0');
FileReading::ReadBytes( f, buf, iSize, sError );
RString ret(buf);
delete [] buf;