mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 06:42:12 +00:00
Fix iterator invalidation for Map::Get
This commit is contained in:
parent
698bd251ea
commit
fed2d11be5
1 changed files with 2 additions and 0 deletions
|
@ -125,6 +125,7 @@ template<typename M> expand_types_vm<typename M::ValueType> MapGet(M * self,expa
|
|||
{
|
||||
typename M::ValueType n {};
|
||||
self->Insert(key,n);
|
||||
self->info->rev++; // invalidate iterators
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
@ -139,6 +140,7 @@ template<typename M> void MapGetString(M * self,expand_types_vm<typename M::KeyT
|
|||
{
|
||||
out = FString();
|
||||
self->Insert(key,out);
|
||||
self->info->rev++; // invalidate iterators
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue