aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2009-09-29 07:56:29 -0700
committerDiva Canto2009-09-29 07:56:29 -0700
commit37a8b2b8b769a3098cd5945b3c57235068c36410 (patch)
tree3b344f3347f416b0441f24d9b09569c4824b32a0
parentA little hack to see if this fixes the problems with ~20% of SOG's becoming p... (diff)
parent Given the perverse way that strided works, if (diff)
downloadopensim-SC-37a8b2b8b769a3098cd5945b3c57235068c36410.zip
opensim-SC-37a8b2b8b769a3098cd5945b3c57235068c36410.tar.gz
opensim-SC-37a8b2b8b769a3098cd5945b3c57235068c36410.tar.bz2
opensim-SC-37a8b2b8b769a3098cd5945b3c57235068c36410.tar.xz
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 1ebe24e..0bd6546 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4999,6 +4999,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4999 if (end > src.Length) 4999 if (end > src.Length)
5000 end = src.Length; 5000 end = src.Length;
5001 5001
5002 if (stride == 0)
5003 stride = 1;
5004
5002 // There may be one or two ranges to be considered 5005 // There may be one or two ranges to be considered
5003 5006
5004 if (start != end) 5007 if (start != end)
@@ -5025,9 +5028,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5025 // A negative stride reverses the direction of the 5028 // A negative stride reverses the direction of the
5026 // scan producing an inverted list as a result. 5029 // scan producing an inverted list as a result.
5027 5030
5028 if (stride == 0)
5029 stride = 1;
5030
5031 if (stride > 0) 5031 if (stride > 0)
5032 { 5032 {
5033 for (int i = 0; i < src.Length; i += stride) 5033 for (int i = 0; i < src.Length; i += stride)
@@ -5051,7 +5051,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5051 } 5051 }
5052 else 5052 else
5053 { 5053 {
5054 result.Add(src.Data[start]); 5054 if (start%stride == 0)
5055 {
5056 result.Add(src.Data[start]);
5057 }
5055 } 5058 }
5056 5059
5057 return result; 5060 return result;