mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Mantis#2307. Thank you kindly, Godfrey for a patch that solves:
In Second Life's implementation of llParseString2List(), all spacer strings which occur within the source string are included in the resulting list. In OpenSim's implementation, any spacers occurring at the beginning of the string are discarded; furthermore, if multiple spacers occur between non-spacer elements, or at the end of the source string, only the first spacer is added to the resulting list; the remainder are discarded.
This commit is contained in:
@@ -4696,19 +4696,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (cindex > 0)
|
||||
{
|
||||
ret.Add(str.Substring(0, cindex));
|
||||
// Cannot use spacers.Contains() because spacers may be either type String or LSLString
|
||||
for (int j = 0; j < spacers.Length; j++)
|
||||
{
|
||||
if (spacers.Data[j].ToString() == cdeli)
|
||||
{
|
||||
ret.Add(cdeli);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cindex == 0 && spacers.Contains(cdeli))
|
||||
}
|
||||
// Cannot use spacers.Contains() because spacers may be either type String or LSLString
|
||||
for (int j = 0; j < spacers.Length; j++)
|
||||
{
|
||||
ret.Add(cdeli);
|
||||
if (spacers.Data[j].ToString() == cdeli)
|
||||
{
|
||||
ret.Add(cdeli);
|
||||
break;
|
||||
}
|
||||
}
|
||||
str = str.Substring(cindex + cdeli.Length);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user