diff --git a/pcsx2/CDVD/BlockdumpFileReader.cpp b/pcsx2/CDVD/BlockdumpFileReader.cpp index 3063c51b71..6720d5535a 100644 --- a/pcsx2/CDVD/BlockdumpFileReader.cpp +++ b/pcsx2/CDVD/BlockdumpFileReader.cpp @@ -85,20 +85,19 @@ bool BlockdumpFileReader::Open(const wxString& fileName) m_file->SeekI(BlockDumpHeaderSize); - ScopedPtr buffer; u32 bs = 1024*1024; u32 off = 0; u32 has = 0; int i = 0; - buffer = new u8[bs]; + ScopedArray buffer(bs); do { - m_file->Read(buffer, bs); + m_file->Read(buffer.GetPtr(), bs); has = m_file->LastRead(); while (i < m_dtablesize && off < has) { - m_dtable[i++] = *(u32*)(buffer + off); + m_dtable[i++] = *(u32*)(buffer.GetPtr() + off); off += 4; off += m_blocksize; }