mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- clear intermediate entries when inserting an object beyond the end of an array.
This commit is contained in:
parent
3b45f1ceb8
commit
38df70f4bc
1 changed files with 2 additions and 0 deletions
|
@ -880,8 +880,10 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Delete, ArrayDelete<FDynArray_Obj>)
|
|||
|
||||
void ObjArrayInsert(FDynArray_Obj *self,int index, DObject *obj)
|
||||
{
|
||||
int oldSize = self->Size();
|
||||
GC::WriteBarrier(obj);
|
||||
self->Insert(index, obj);
|
||||
for (unsigned i = oldSize; i < self->Size() - 1; i++) (*self)[i] = nullptr;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_Obj, Insert, ObjArrayInsert)
|
||||
|
|
Loading…
Reference in a new issue