diff options
author | Charles Krinke | 2008-10-03 02:33:59 +0000 |
---|---|---|
committer | Charles Krinke | 2008-10-03 02:33:59 +0000 |
commit | d5b3a66f524b2709c819c90bcc2d9396218c9306 (patch) | |
tree | 8fdd522c1aaebe1eb173c89ee602e3b484b3f061 /OpenSim/Region/ScriptEngine | |
parent | Check for empty string as well, just as illegal. (diff) | |
download | opensim-SC_OLD-d5b3a66f524b2709c819c90bcc2d9396218c9306.zip opensim-SC_OLD-d5b3a66f524b2709c819c90bcc2d9396218c9306.tar.gz opensim-SC_OLD-d5b3a66f524b2709c819c90bcc2d9396218c9306.tar.bz2 opensim-SC_OLD-d5b3a66f524b2709c819c90bcc2d9396218c9306.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 39636b6..4ae4fe2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4696,20 +4696,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4696 | if (cindex > 0) | 4696 | if (cindex > 0) |
4697 | { | 4697 | { |
4698 | ret.Add(str.Substring(0, cindex)); | 4698 | ret.Add(str.Substring(0, cindex)); |
4699 | // Cannot use spacers.Contains() because spacers may be either type String or LSLString | 4699 | } |
4700 | for (int j = 0; j < spacers.Length; j++) | 4700 | // Cannot use spacers.Contains() because spacers may be either type String or LSLString |
4701 | for (int j = 0; j < spacers.Length; j++) | ||
4702 | { | ||
4703 | if (spacers.Data[j].ToString() == cdeli) | ||
4701 | { | 4704 | { |
4702 | if (spacers.Data[j].ToString() == cdeli) | 4705 | ret.Add(cdeli); |
4703 | { | 4706 | break; |
4704 | ret.Add(cdeli); | ||
4705 | break; | ||
4706 | } | ||
4707 | } | 4707 | } |
4708 | } | 4708 | } |
4709 | if (cindex == 0 && spacers.Contains(cdeli)) | ||
4710 | { | ||
4711 | ret.Add(cdeli); | ||
4712 | } | ||
4713 | str = str.Substring(cindex + cdeli.Length); | 4709 | str = str.Substring(cindex + cdeli.Length); |
4714 | } | 4710 | } |
4715 | } while (dfound); | 4711 | } while (dfound); |