Fix issue with LSL jumps screwing up the C# compiler error -> LSL code position map and leading to invalid error line numbers/columns

This is because jump statement generation was mistakenly inserting its own line without updating the csharp positions in CSCodeGenerator.
This is Aleric Inglewood's patch in http://opensimulator.org/mantis/view.php?id=7195 but applied to opensim itself rather than the defunct code generation in opensim-libs.  Thanks!
This patch also adds a regression test for this case from myself.
This commit is contained in:
Justin Clark-Casey (justincc)
2014-06-18 22:20:25 +01:00
parent db0c41501c
commit a0d6705fe6
2 changed files with 63 additions and 16 deletions

View File

@@ -626,11 +626,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
string labelStatement;
if (m_insertCoopTerminationChecks)
labelStatement = m_coopTerminationCheck + "\n";
labelStatement = m_coopTerminationCheck;
else
labelStatement = "NoOp();\n";
labelStatement = "NoOp();";
return Generate(String.Format("{0}: ", CheckName(jl.LabelName)), jl) + labelStatement;
return GenerateLine(String.Format("{0}: {1}", CheckName(jl.LabelName), labelStatement), jl);
}
/// <summary>