diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 |
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; |