Thank you, idb, for a patch that fixes the jump function in LSL.
0.6.0-stable
Melanie Thielker 2008-11-06 23:10:49 +00:00
parent 486ac1e12f
commit 9e4fc8e03a
2 changed files with 9 additions and 2 deletions

View File

@ -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.
}
}
}

View File

@ -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>