From 271bbb25574f2a8e579faa6a35187d8a4f5c4662 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Fri, 5 Sep 2008 23:21:02 +0000 Subject: Thank you kindly, KrTaylor for a patch that adds: llParseString functions throw exception when passed a list of variables and this patch adds logic to solve this to LSL_Api.cs --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index aa22b2b..74c2d89 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4431,7 +4431,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { int index = str.IndexOf(delimiters[i].ToString()); bool found = index != -1; - if (found) + if (found && String.Empty != delimiters[i].ToString()) { if ((cindex > index) || (cindex == -1)) { @@ -4446,9 +4446,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (cindex > 0) { ret.Add(str.Substring(0, cindex)); - if (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; + } } } if (cindex == 0 && spacers.Contains(cdeli)) -- cgit v1.1