diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs index d917939..ab9968f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | |||
@@ -671,9 +671,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
671 | 671 | ||
672 | retstr += GenerateIndented("for (", fl); | 672 | retstr += GenerateIndented("for (", fl); |
673 | 673 | ||
674 | // It's possible that we don't have an assignment, in which case | ||
675 | // the child will be null and we only print the semicolon. | ||
674 | // for ( x = 0 ; x < 10 ; x++ ) | 676 | // for ( x = 0 ; x < 10 ; x++ ) |
675 | // ^^^^^^^ | 677 | // ^^^^^^^ |
676 | retstr += GenerateForLoopStatement((ForLoopStatement) fl.kids.Pop()); | 678 | ForLoopStatement s = (ForLoopStatement) fl.kids.Pop(); |
679 | if (null != s) | ||
680 | { | ||
681 | retstr += GenerateForLoopStatement(s); | ||
682 | } | ||
677 | retstr += Generate("; "); | 683 | retstr += Generate("; "); |
678 | // for ( x = 0 ; x < 10 ; x++ ) | 684 | // for ( x = 0 ; x < 10 ; x++ ) |
679 | // ^^^^^^^^ | 685 | // ^^^^^^^^ |