diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e0614da..6c4f34a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3454,6 +3454,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3454 | public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending) | 3454 | public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending) |
3455 | { | 3455 | { |
3456 | m_host.AddScriptLPS(1); | 3456 | m_host.AddScriptLPS(1); |
3457 | |||
3458 | if (stride <= 0) | ||
3459 | { | ||
3460 | stride = 1; | ||
3461 | } | ||
3457 | return src.Sort(stride, ascending); | 3462 | return src.Sort(stride, ascending); |
3458 | } | 3463 | } |
3459 | 3464 | ||
@@ -3766,8 +3771,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3766 | 3771 | ||
3767 | m_host.AddScriptLPS(1); | 3772 | m_host.AddScriptLPS(1); |
3768 | 3773 | ||
3769 | if (stride == 0) | 3774 | if (stride <= 0) |
3775 | { | ||
3770 | stride = 1; | 3776 | stride = 1; |
3777 | } | ||
3771 | 3778 | ||
3772 | // Stride MUST be a factor of the list length | 3779 | // Stride MUST be a factor of the list length |
3773 | // If not, then return the src list. This also | 3780 | // If not, then return the src list. This also |