diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bd451a5..975bf2d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -8202,7 +8202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8202 | else | 8202 | else |
8203 | remaining = GetAgentParams((ScenePresence)entity, rules, ref result); | 8203 | remaining = GetAgentParams((ScenePresence)entity, rules, ref result); |
8204 | 8204 | ||
8205 | if (remaining == null || remaining.Length <= 2) | 8205 | if (remaining == null || remaining.Length < 2) |
8206 | return result; | 8206 | return result; |
8207 | 8207 | ||
8208 | int linknumber = remaining.GetLSLIntegerItem(0); | 8208 | int linknumber = remaining.GetLSLIntegerItem(0); |
@@ -8786,7 +8786,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8786 | case (int)ScriptBaseClass.PRIM_LINK_TARGET: | 8786 | case (int)ScriptBaseClass.PRIM_LINK_TARGET: |
8787 | 8787 | ||
8788 | // TODO: Should be issuing a runtime script warning in this case. | 8788 | // TODO: Should be issuing a runtime script warning in this case. |
8789 | if (remain < 3) | 8789 | if (remain < 2) |
8790 | return null; | 8790 | return null; |
8791 | 8791 | ||
8792 | return rules.GetSublist(idx, -1); | 8792 | return rules.GetSublist(idx, -1); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs index ff87cc1..ed61dc0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs | |||
@@ -100,6 +100,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
100 | Assert.That(resList.Length, Is.EqualTo(1)); | 100 | Assert.That(resList.Length, Is.EqualTo(1)); |
101 | } | 101 | } |
102 | 102 | ||
103 | // Check 2 prim case | ||
104 | { | ||
105 | LSL_List resList | ||
106 | = apiGrp1.llGetLinkPrimitiveParams( | ||
107 | 1, | ||
108 | new LSL_List( | ||
109 | new LSL_Integer(ScriptBaseClass.PRIM_ROTATION), | ||
110 | new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET), | ||
111 | new LSL_Integer(2), | ||
112 | new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); | ||
113 | |||
114 | Assert.That(resList.Length, Is.EqualTo(2)); | ||
115 | } | ||
116 | |||
103 | // Check invalid parameters are ignored | 117 | // Check invalid parameters are ignored |
104 | { | 118 | { |
105 | LSL_List resList | 119 | LSL_List resList |