From d09cfff738f53f65efdeb1f39ce5ce1db81ee747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Lu=C3=ADs=20Vaz=20Silva?= Date: Tue, 17 Jan 2023 16:33:41 -0300 Subject: [PATCH 25/51] Fix iterator invalidation for Map::Get --- src/common/scripting/core/maps.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/scripting/core/maps.cpp b/src/common/scripting/core/maps.cpp index 68eab6d3d..bfc2b676d 100644 --- a/src/common/scripting/core/maps.cpp +++ b/src/common/scripting/core/maps.cpp @@ -125,6 +125,7 @@ template expand_types_vm MapGet(M * self,expa { typename M::ValueType n {}; self->Insert(key,n); + self->info->rev++; // invalidate iterators return n; } } @@ -139,6 +140,7 @@ template void MapGetString(M * self,expand_types_vmInsert(key,out); + self->info->rev++; // invalidate iterators } } -- 2.39.3