Change new to mem_alloc (thanks BeaR)

This commit is contained in:
def 2014-10-19 14:09:23 +02:00
parent 0b2bf15c35
commit d213a30bed

View file

@ -651,7 +651,7 @@ int CEditorMap::Load(class IStorage *pStorage, const char *pFileName, int Storag
{
// read the whole file into memory
pSound->m_DataSize = io_length(SoundFile);
pSound->m_pData = new char[pSound->m_DataSize];
pSound->m_pData = mem_alloc(pSound->m_DataSize, 1);
io_read(SoundFile, pSound->m_pData, pSound->m_DataSize);
io_close(SoundFile);
pSound->m_SoundID = m_pEditor->Sound()->LoadWVFromMem(pSound->m_pData, pSound->m_DataSize);