From 0d48725961662c87cd91f8c35cbce3e50779a0aa Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 23 Sep 2003 04:46:01 +0000 Subject: [PATCH] no need to nul termiante this buffer --- stepmania/src/MsdFile.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stepmania/src/MsdFile.cpp b/stepmania/src/MsdFile.cpp index 9ef32ea2f7..dad7efecc8 100644 --- a/stepmania/src/MsdFile.cpp +++ b/stepmania/src/MsdFile.cpp @@ -145,7 +145,7 @@ bool MsdFile::ReadFile( CString sNewPath ) return false; } - int iBufferSize = GetFileSizeInBytes(sNewPath) + 1000; // +1000 because sometimes the bytes read is > filelength. Why? + int iBufferSize = GetFileSizeInBytes(sNewPath); // allocate a string to hold the file char* szFileString = new char[iBufferSize]; @@ -154,7 +154,6 @@ bool MsdFile::ReadFile( CString sNewPath ) close( fd ); ASSERT( iBufferSize > iBytesRead ); - szFileString[iBytesRead] = '\0'; ReadBuf(szFileString, iBytesRead);