diff --git a/src/common/scripting/core/maps.cpp b/src/common/scripting/core/maps.cpp index bb7cd369b..28fda643e 100644 --- a/src/common/scripting/core/maps.cpp +++ b/src/common/scripting/core/maps.cpp @@ -162,7 +162,15 @@ template void MapInsert(M * self, expand_types_vmInsert(key, value); + + if constexpr(std::is_same_v) + { + self->Insert(key,static_cast(value)); + } + else + { + self->Insert(key, value); + } self->info->rev++; // invalidate iterators } @@ -246,7 +254,15 @@ template void MapIteratorSetValue(I * self, expand_types_vm) + { + val = static_cast(value); + } + else + { + val = value; + } }