aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-07-09 01:24:30 +0100
committerJustin Clark-Casey (justincc)2011-07-09 01:24:30 +0100
commitf680c134955b3179265ec197c935ed86b397b6ad (patch)
tree0c5c1ee5dfcba4b9bf4d7fb4749a4775298347f7 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentfix formatting issues from last patch (diff)
downloadopensim-SC_OLD-f680c134955b3179265ec197c935ed86b397b6ad.zip
opensim-SC_OLD-f680c134955b3179265ec197c935ed86b397b6ad.tar.gz
opensim-SC_OLD-f680c134955b3179265ec197c935ed86b397b6ad.tar.bz2
opensim-SC_OLD-f680c134955b3179265ec197c935ed86b397b6ad.tar.xz
Fix osMatchString() so that it reports all instance of pattern matches, not just the first one.
This is a slight adaptation of the patch in http://opensimulator.org/mantis/view.php?id=4568 which doesn't apply directly since the underlying code was changed by earlier makopoppo patches. Thanks makopoppo!
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index b3f90e2..b710229 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1909,8 +1909,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1909 }; 1909 };
1910 1910
1911 return NotecardCache.GetLines(assetID); 1911 return NotecardCache.GetLines(assetID);
1912
1913
1914 } 1912 }
1915 1913
1916 public string osAvatarName2Key(string firstname, string lastname) 1914 public string osAvatarName2Key(string firstname, string lastname)
@@ -2024,7 +2022,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2024 // Find matches beginning at start position 2022 // Find matches beginning at start position
2025 Regex matcher = new Regex(pattern); 2023 Regex matcher = new Regex(pattern);
2026 Match match = matcher.Match(src, start); 2024 Match match = matcher.Match(src, start);
2027 if (match.Success) 2025 while (match.Success)
2028 { 2026 {
2029 foreach (System.Text.RegularExpressions.Group g in match.Groups) 2027 foreach (System.Text.RegularExpressions.Group g in match.Groups)
2030 { 2028 {
@@ -2034,6 +2032,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2034 result.Add(new LSL_Integer(g.Index)); 2032 result.Add(new LSL_Integer(g.Index));
2035 } 2033 }
2036 } 2034 }
2035
2036 match = match.NextMatch();
2037 } 2037 }
2038 2038
2039 return result; 2039 return result;