Fix EST file resource reallocation.

This commit is contained in:
Ottermandias 2022-03-22 23:28:07 +01:00
parent efc21c7882
commit 2b0844a21e

View file

@ -51,13 +51,7 @@ public sealed unsafe class EstFile : MetaBaseFile
{
if( Length < Size + EntryDescSize + EntrySize )
{
var data = Data;
var length = Length;
AllocateData( length + IncreaseSize );
Functions.MemCpyUnchecked( Data, data, length );
Functions.MemSet( Data + length, 0, IncreaseSize );
GC.RemoveMemoryPressure( length );
Marshal.FreeHGlobal( ( IntPtr )data );
ResizeResources( Length + IncreaseSize );
}
var control = ( Info* )( Data + 4 );