Browse Source

Fix for issue that MSVC should have caught

Josh Engebretson 9 years ago
parent
commit
74a969f651
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Source/ToolCore/JSBind/JSBTypeScript.cpp

+ 2 - 1
Source/ToolCore/JSBind/JSBTypeScript.cpp

@@ -288,7 +288,8 @@ void JSBTypeScript::ExportModuleClasses(JSBModule* module)
 
 
 void JSBTypeScript::ExportModuleConstants(JSBModule* module)
 void JSBTypeScript::ExportModuleConstants(JSBModule* module)
 {
 {
-    Vector<String>& constants = module->GetConstants().Keys();
+    // we're going to modify the vector, so copy the keys locally instead of using a reference
+    Vector<String> constants = module->GetConstants().Keys();
 
 
     if (!constants.Size())
     if (!constants.Size())
         return;
         return;