diff options
author | Melanie Thielker | 2008-11-08 15:31:02 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-08 15:31:02 +0000 |
commit | 5c0fd512e8614bfd6ab494af1efafbeeb22b7382 (patch) | |
tree | 28863eb61e9dc190c0875d968d82f2a30c424510 /OpenSim/Region | |
parent | Add some discovery code, laying groundwork for region-crossing scripts (diff) | |
download | opensim-SC-5c0fd512e8614bfd6ab494af1efafbeeb22b7382.zip opensim-SC-5c0fd512e8614bfd6ab494af1efafbeeb22b7382.tar.gz opensim-SC-5c0fd512e8614bfd6ab494af1efafbeeb22b7382.tar.bz2 opensim-SC-5c0fd512e8614bfd6ab494af1efafbeeb22b7382.tar.xz |
Fix llParseString* to create LSLStrings. This makes llListFindList work
on lists created by parsing
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 59f5ccd..08f8c01 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4642,18 +4642,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4642 | { | 4642 | { |
4643 | for (int i = 0; i < length; i++) | 4643 | for (int i = 0; i < length; i++) |
4644 | { | 4644 | { |
4645 | if (src.Data[i].Equals(test.Data[0])) | 4645 | if (src.Data[i].Equals(test.Data[0])) |
4646 | { | 4646 | { |
4647 | int j; | 4647 | int j; |
4648 | for (j = 1; j < test.Length; j++) | 4648 | for (j = 1; j < test.Length; j++) |
4649 | if (!src.Data[i+j].Equals(test.Data[j])) | 4649 | if (!src.Data[i+j].Equals(test.Data[j])) |
4650 | break; | 4650 | break; |
4651 | if (j == test.Length) | 4651 | if (j == test.Length) |
4652 | { | 4652 | { |
4653 | index = i; | 4653 | index = i; |
4654 | break; | 4654 | break; |
4655 | } | 4655 | } |
4656 | } | 4656 | } |
4657 | } | 4657 | } |
4658 | } | 4658 | } |
4659 | 4659 | ||
@@ -4939,14 +4939,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4939 | { | 4939 | { |
4940 | if (cindex > 0) | 4940 | if (cindex > 0) |
4941 | { | 4941 | { |
4942 | ret.Add(str.Substring(0, cindex)); | 4942 | ret.Add(new LSL_String(str.Substring(0, cindex))); |
4943 | } | 4943 | } |
4944 | // Cannot use spacers.Contains() because spacers may be either type String or LSLString | 4944 | // Cannot use spacers.Contains() because spacers may be either type String or LSLString |
4945 | for (int j = 0; j < spacers.Length; j++) | 4945 | for (int j = 0; j < spacers.Length; j++) |
4946 | { | 4946 | { |
4947 | if (spacers.Data[j].ToString() == cdeli) | 4947 | if (spacers.Data[j].ToString() == cdeli) |
4948 | { | 4948 | { |
4949 | ret.Add(cdeli); | 4949 | ret.Add(new LSL_String(cdeli)); |
4950 | break; | 4950 | break; |
4951 | } | 4951 | } |
4952 | } | 4952 | } |
@@ -4955,7 +4955,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4955 | } while (dfound); | 4955 | } while (dfound); |
4956 | if (str != "") | 4956 | if (str != "") |
4957 | { | 4957 | { |
4958 | ret.Add(str); | 4958 | ret.Add(new LSL_String(str)); |
4959 | } | 4959 | } |
4960 | return ret; | 4960 | return ret; |
4961 | } | 4961 | } |
@@ -7291,14 +7291,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7291 | { | 7291 | { |
7292 | // no markers were found on this pass | 7292 | // no markers were found on this pass |
7293 | // so we're pretty much done | 7293 | // so we're pretty much done |
7294 | tokens.Add(src.Substring(beginning, srclen - beginning)); | 7294 | tokens.Add(new LSL_String(src.Substring(beginning, srclen - beginning))); |
7295 | break; | 7295 | break; |
7296 | } | 7296 | } |
7297 | 7297 | ||
7298 | // Otherwise we just add the newly delimited token | 7298 | // Otherwise we just add the newly delimited token |
7299 | // and recalculate where the search should continue. | 7299 | // and recalculate where the search should continue. |
7300 | 7300 | ||
7301 | tokens.Add(src.Substring(beginning,offset[best]-beginning)); | 7301 | tokens.Add(new LSL_String(src.Substring(beginning,offset[best]-beginning))); |
7302 | 7302 | ||
7303 | if (best < seplen) | 7303 | if (best < seplen) |
7304 | { | 7304 | { |
@@ -7307,7 +7307,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7307 | else | 7307 | else |
7308 | { | 7308 | { |
7309 | beginning = offset[best] + (spcarray[best - seplen].ToString()).Length; | 7309 | beginning = offset[best] + (spcarray[best - seplen].ToString()).Length; |
7310 | tokens.Add(spcarray[best - seplen]); | 7310 | tokens.Add(new LSL_String(spcarray[best - seplen].ToString())); |
7311 | } | 7311 | } |
7312 | } | 7312 | } |
7313 | 7313 | ||
@@ -7320,7 +7320,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7320 | if (beginning == srclen) | 7320 | if (beginning == srclen) |
7321 | { | 7321 | { |
7322 | if (srclen != 0) | 7322 | if (srclen != 0) |
7323 | tokens.Add(""); | 7323 | tokens.Add(new LSL_String("")); |
7324 | } | 7324 | } |
7325 | 7325 | ||
7326 | return tokens; | 7326 | return tokens; |