mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix MemoryStream::EnsureCapacity
This commit is contained in:
parent
d124f4fad0
commit
ad1634631f
|
@ -178,7 +178,9 @@ void MemoryStream::EnsureCapacity(size_t capacity)
|
|||
newCapacity *= 2;
|
||||
}
|
||||
|
||||
uint64 position = GetPosition();
|
||||
_dataCapacity = newCapacity;
|
||||
Memory::Reallocate(_data, _dataCapacity);
|
||||
_data = Memory::Reallocate(_data, _dataCapacity);
|
||||
_position = (void *)((uintptr_t)_data + (uintptr_t)position);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue