ME3Explorer.TOCeditor.editFilesize C# (CSharp) Method

editFilesize() private method

private editFilesize ( int n, string newsize ) : void
n int
newsize string
return void
        private void editFilesize(int n, string newsize)
        {
            Inventory temp = content[n];
            try
            {
                temp.size = Convert.ToUInt32(newsize);
            }
            catch (FormatException)
            {
                //exit this method
                return;
            }
            content[n] = temp;
            uint pos = temp.offset;
            byte[] buff = BitConverter.GetBytes(temp.size);
            for (int i = 0; i < 4; i++)
            {
                memory[pos + i] = buff[i];
            }
        }