mirror of
https://github.com/opensim/opensim.git
synced 2026-07-13 19:14:51 +08:00
Mantis #2571
Thank you, idb, for a patch that fixes the jump function in LSL.
This commit is contained in:
@@ -194,5 +194,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
SetVars(m_InitialValues);
|
||||
}
|
||||
|
||||
public void NoOp()
|
||||
{
|
||||
// Does what is says on the packet. Nowt, nada, nothing.
|
||||
// Required for insertion after a jump label to do what it says on the packet!
|
||||
// With a bit of luck the compiler may even optimize it out.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
/// <returns>String containing C# code for JumpLabel jl.</returns>
|
||||
private string GenerateJumpLabel(JumpLabel jl)
|
||||
{
|
||||
return Generate(String.Format("{0}:\n", jl.LabelName), jl);
|
||||
return Generate(String.Format("{0}:", CheckName(jl.LabelName)), jl) + " NoOp();\n";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -484,7 +484,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
||||
/// <returns>String containing C# code for JumpStatement js.</returns>
|
||||
private string GenerateJumpStatement(JumpStatement js)
|
||||
{
|
||||
return Generate(String.Format("goto {0}", js.TargetName), js);
|
||||
return Generate(String.Format("goto {0}", CheckName(js.TargetName)), js);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user