diff --git a/source/simulation2/serialization/StdDeserializer.cpp b/source/simulation2/serialization/StdDeserializer.cpp index e4e6b233f4..f3d7335d24 100644 --- a/source/simulation2/serialization/StdDeserializer.cpp +++ b/source/simulation2/serialization/StdDeserializer.cpp @@ -410,6 +410,9 @@ jsval CStdDeserializer::ReadScriptVal(const char* UNUSED(name), JS::HandleObject NumberU32_Unbounded("map size", mapSize); JS::RootedValue mapVal(cx); m_ScriptInterface.Eval("(new Map())", &mapVal); + + // To match the serializer order, we reserve the map's backref tag here + u32 mapTag = ReserveScriptBackref(); for (u32 i=0; i