Browse Source

fixed free variables not boxing for loop counter when a break is used

albertodemichelis 8 years ago
parent
commit
b89da87b10
1 changed files with 3 additions and 2 deletions
  1. 3 2
      squirrel/sqcompiler.cpp

+ 3 - 2
squirrel/sqcompiler.cpp

@@ -1171,9 +1171,10 @@ public:
         }
         _fs->AddInstruction(_OP_JMP, 0, jmppos - _fs->GetCurrentPos() - 1, 0);
         if(jzpos>  0) _fs->SetIntructionParam(jzpos, 1, _fs->GetCurrentPos() - jzpos);
-        END_SCOPE();
-
+        
         END_BREAKBLE_BLOCK(continuetrg);
+
+		END_SCOPE();
     }
     void ForEachStatement()
     {