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!bulletsim
parent
52c3671aa0
commit
f680c13495
|
@ -1909,8 +1909,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
};
|
||||
|
||||
return NotecardCache.GetLines(assetID);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public string osAvatarName2Key(string firstname, string lastname)
|
||||
|
@ -2024,7 +2022,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
// Find matches beginning at start position
|
||||
Regex matcher = new Regex(pattern);
|
||||
Match match = matcher.Match(src, start);
|
||||
if (match.Success)
|
||||
while (match.Success)
|
||||
{
|
||||
foreach (System.Text.RegularExpressions.Group g in match.Groups)
|
||||
{
|
||||
|
@ -2034,6 +2032,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
result.Add(new LSL_Integer(g.Index));
|
||||
}
|
||||
}
|
||||
|
||||
match = match.NextMatch();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue