aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorMelanie2011-01-25 16:19:29 +0100
committerMelanie2011-01-25 16:19:29 +0100
commit3c075aaf46a9e8b9f601b664ae277ffa12ac3e0f (patch)
treeaed132f5739ea4e11be80f5f223b9d4cb95f6362 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentComplete country support (diff)
downloadopensim-SC-3c075aaf46a9e8b9f601b664ae277ffa12ac3e0f.zip
opensim-SC-3c075aaf46a9e8b9f601b664ae277ffa12ac3e0f.tar.gz
opensim-SC-3c075aaf46a9e8b9f601b664ae277ffa12ac3e0f.tar.bz2
opensim-SC-3c075aaf46a9e8b9f601b664ae277ffa12ac3e0f.tar.xz
Reproduce a corner case behavior for llListReplaceList
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 805b344..dffc0bd 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -9422,7 +9422,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9422 } 9422 }
9423 9423
9424 /// <summary> 9424 /// <summary>
9425 /// illListReplaceList removes the sub-list defined by the inclusive indices 9425 /// llListReplaceList removes the sub-list defined by the inclusive indices
9426 /// start and end and inserts the src list in its place. The inclusive 9426 /// start and end and inserts the src list in its place. The inclusive
9427 /// nature of the indices means that at least one element must be deleted 9427 /// nature of the indices means that at least one element must be deleted
9428 /// if the indices are within the bounds of the existing list. I.e. 2,2 9428 /// if the indices are within the bounds of the existing list. I.e. 2,2
@@ -9479,16 +9479,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9479 // based upon end. Note that if end exceeds the upper 9479 // based upon end. Note that if end exceeds the upper
9480 // bound in this case, the entire destination list 9480 // bound in this case, the entire destination list
9481 // is removed. 9481 // is removed.
9482 else 9482 else if (start == 0)
9483 { 9483 {
9484 if (end + 1 < dest.Length) 9484 if (end + 1 < dest.Length)
9485 {
9486 return src + dest.GetSublist(end + 1, -1); 9485 return src + dest.GetSublist(end + 1, -1);
9487 }
9488 else 9486 else
9489 {
9490 return src; 9487 return src;
9491 } 9488 }
9489 else // Start < 0
9490 {
9491 if (end + 1 < dest.Length)
9492 return dest.GetSublist(end + 1, -1);
9493 else
9494 return new LSL_List();
9492 } 9495 }
9493 } 9496 }
9494 // Finally, if start > end, we strip away a prefix and 9497 // Finally, if start > end, we strip away a prefix and