From 1c0c0a046842c0b937a07e5a957950faf54611af Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 11 Apr 2020 13:20:41 +0300 Subject: fixed malloc/new --- src/control/Record.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/control/Record.cpp b/src/control/Record.cpp index e858bc1d..aead1720 100644 --- a/src/control/Record.cpp +++ b/src/control/Record.cpp @@ -40,7 +40,7 @@ void CRecordDataForGame::Init(void) RecordingState = STATE_PLAYBACK; } if (RecordingState == STATE_PLAYBACK) { - pDataBufferPointer = (uint8*)malloc(MEMORY_FOR_GAME_RECORD); + pDataBufferPointer = new uint8[MEMORY_FOR_GAME_RECORD]; pDataBuffer = pDataBufferPointer; pDataBuffer[CFileMgr::Read(FId, (char*)pDataBufferPointer, MEMORY_FOR_GAME_RECORD) + 8] = -1; CFileMgr::CloseFile(FId); -- cgit v1.2.3