diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
index 287b85b669..69c5d39999 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
@@ -1137,7 +1137,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
/// Indentation based on brace count.
private void Indent(StringBuilder sb)
{
- sb.Append(" ");
+ for (int i = 0; i < m_braceCount; i++)
+ sb.Append(" ");
}
///