mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
Fix bug where using PRIM_LINK_TARGET with only two remaining list items (e.g. link number then PRIM_ROTATION) would not return the parameter
Extended regression test for this case
This commit is contained in:
@@ -8202,7 +8202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
else
|
||||
remaining = GetAgentParams((ScenePresence)entity, rules, ref result);
|
||||
|
||||
if (remaining == null || remaining.Length <= 2)
|
||||
if (remaining == null || remaining.Length < 2)
|
||||
return result;
|
||||
|
||||
int linknumber = remaining.GetLSLIntegerItem(0);
|
||||
@@ -8786,7 +8786,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
case (int)ScriptBaseClass.PRIM_LINK_TARGET:
|
||||
|
||||
// TODO: Should be issuing a runtime script warning in this case.
|
||||
if (remain < 3)
|
||||
if (remain < 2)
|
||||
return null;
|
||||
|
||||
return rules.GetSublist(idx, -1);
|
||||
|
||||
Reference in New Issue
Block a user