From 017381a1c65c85053ba65de22c4a486203e8f936 Mon Sep 17 00:00:00 2001 From: Mike Dickson Date: Mon, 13 Nov 2023 12:39:25 -0500 Subject: [PATCH] For LinkSetData Find and returning a list of keys a count value of < 1 is an indication to return all available. Adjust the code to behave that way. It was originally looking at -1 as an indication to do that. --- OpenSim/Framework/VersionInfo.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/OpenSim/Framework/VersionInfo.cs b/OpenSim/Framework/VersionInfo.cs index 6a3d0dd79d0..b0764bca611 100644 --- a/OpenSim/Framework/VersionInfo.cs +++ b/OpenSim/Framework/VersionInfo.cs @@ -39,7 +39,7 @@ public class VersionInfo { public const string VersionNumber = "0.9.2.2"; public const string AssemblyVersionNumber = "0.9.2.2"; - public const string Release = "8711"; + public const string Release = "8717"; public static string Version { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 75ced5375ee..1b3fcb44ab4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -5819,14 +5819,18 @@ public void DeSerializeAnimations(Byte[] data) public string[] FindLinksetDataKeys(string pattern, int start, int count) { - List all_keys = new List(GetLinksetDataSubList(0, -1)); + List all_keys = new List(GetLinksetDataSubList(0, 0)); RegexOptions options = RegexOptions.CultureInvariant; Regex rx = new Regex(pattern, options); - if (count == -1) count = all_keys.Count; + + if (count < 1) + count = all_keys.Count; + List matches = new List(); foreach (var str in all_keys) { - if(rx.IsMatch(str)) matches.Add(str); + if (rx.IsMatch(str)) + matches.Add(str); } return matches.Skip(start).Take(count).ToArray(); @@ -5984,7 +5988,7 @@ public string[] GetLinksetDataSubList(int start, int count) { lock (linksetDataLock) { - if (count == -1) + if (count < 1) count = LinksetDataKeys; if (LinksetData == null)