mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 06:42:08 +00:00
Fix possible memory corruption in TArray::Delete(index, count)
This commit is contained in:
parent
c041b437e1
commit
9e19134016
1 changed files with 2 additions and 0 deletions
|
@ -453,6 +453,8 @@ public:
|
|||
|
||||
void Delete (unsigned int index, int deletecount)
|
||||
{
|
||||
if(index >= Count) return;
|
||||
|
||||
if (index + deletecount > Count)
|
||||
{
|
||||
deletecount = Count - index;
|
||||
|
|
Loading…
Reference in a new issue