mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
parent
f8e9ea45ba
commit
4c7fc8a70a
@ -696,13 +696,16 @@ namespace fs
|
||||
{
|
||||
const u64 old_size = obj.size();
|
||||
|
||||
if (old_size + size < old_size)
|
||||
if (old_size + size < old_size || pos + size < pos)
|
||||
{
|
||||
xovfl();
|
||||
}
|
||||
|
||||
if (pos > old_size)
|
||||
{
|
||||
// Reserve memory
|
||||
obj.reserve(pos + size);
|
||||
|
||||
// Fill gap if necessary (default-initialized)
|
||||
obj.resize(pos);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user