aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs7
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs4
2 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs
index 6e56231..25c823d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs
@@ -194,5 +194,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
194 { 194 {
195 SetVars(m_InitialValues); 195 SetVars(m_InitialValues);
196 } 196 }
197
198 public void NoOp()
199 {
200 // Does what is says on the packet. Nowt, nada, nothing.
201 // Required for insertion after a jump label to do what it says on the packet!
202 // With a bit of luck the compiler may even optimize it out.
203 }
197 } 204 }
198} 205}
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
index 795d38f..37d29f7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
@@ -474,7 +474,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
474 /// <returns>String containing C# code for JumpLabel jl.</returns> 474 /// <returns>String containing C# code for JumpLabel jl.</returns>
475 private string GenerateJumpLabel(JumpLabel jl) 475 private string GenerateJumpLabel(JumpLabel jl)
476 { 476 {
477 return Generate(String.Format("{0}:\n", jl.LabelName), jl); 477 return Generate(String.Format("{0}:", CheckName(jl.LabelName)), jl) + " NoOp();\n";
478 } 478 }
479 479
480 /// <summary> 480 /// <summary>
@@ -484,7 +484,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
484 /// <returns>String containing C# code for JumpStatement js.</returns> 484 /// <returns>String containing C# code for JumpStatement js.</returns>
485 private string GenerateJumpStatement(JumpStatement js) 485 private string GenerateJumpStatement(JumpStatement js)
486 { 486 {
487 return Generate(String.Format("goto {0}", js.TargetName), js); 487 return Generate(String.Format("goto {0}", CheckName(js.TargetName)), js);
488 } 488 }
489 489
490 /// <summary> 490 /// <summary>