1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 12:00:01 +00:00

fixed malloc/new

This commit is contained in:
Nikolay Korolev 2020-04-11 13:20:41 +03:00
parent 1ecb498458
commit 1c0c0a0468

View file

@ -40,7 +40,7 @@ void CRecordDataForGame::Init(void)
RecordingState = STATE_PLAYBACK; RecordingState = STATE_PLAYBACK;
} }
if (RecordingState == STATE_PLAYBACK) { if (RecordingState == STATE_PLAYBACK) {
pDataBufferPointer = (uint8*)malloc(MEMORY_FOR_GAME_RECORD); pDataBufferPointer = new uint8[MEMORY_FOR_GAME_RECORD];
pDataBuffer = pDataBufferPointer; pDataBuffer = pDataBufferPointer;
pDataBuffer[CFileMgr::Read(FId, (char*)pDataBufferPointer, MEMORY_FOR_GAME_RECORD) + 8] = -1; pDataBuffer[CFileMgr::Read(FId, (char*)pDataBufferPointer, MEMORY_FOR_GAME_RECORD) + 8] = -1;
CFileMgr::CloseFile(FId); CFileMgr::CloseFile(FId);