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];
}
}