* Apply cmickeyb's patch from mantis 2068

* llParseString functions throw exception when passed a list of variables 
* Thanks!
0.6.0-stable
Justin Clarke Casey 2008-08-30 21:12:58 +00:00
parent d2344b5626
commit e4ec9829cd
2 changed files with 15 additions and 9 deletions

View File

@ -16,7 +16,7 @@ OpenSim Developers
* CW
* Babblefrog
* Tedd
* justincc (IBM)
* justincc
* Teravus (w3z)
* Johan Berntsson (3Di)
* Ckrinke (Charles Krinke)
@ -61,6 +61,7 @@ Patches
* Junta Kohime
* Homer_Horwitz
* Zha Ewry
* Mic Bowman
LSL Devs

View File

@ -4526,12 +4526,12 @@ namespace OpenSim.Region.ScriptEngine.Common
{
int index = str.IndexOf(delimiters[i].ToString());
bool found = index != -1;
if (found && String.Empty != (string)delimiters[i])
if (found && String.Empty != delimiters[i].ToString())
{
if ((cindex > index) || (cindex == -1))
{
cindex = index;
cdeli = (string)delimiters[i];
cdeli = delimiters[i].ToString();
}
dfound = dfound || found;
}
@ -4541,9 +4541,14 @@ namespace OpenSim.Region.ScriptEngine.Common
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))
@ -6786,7 +6791,7 @@ namespace OpenSim.Region.ScriptEngine.Common
if (active[j])
{
// scan all of the markers
if ((offset[j] = src.IndexOf((string)separray[j],beginning)) == -1)
if ((offset[j] = src.IndexOf(separray[j].ToString(),beginning)) == -1)
{
// not present at all
active[j] = false;
@ -6814,7 +6819,7 @@ namespace OpenSim.Region.ScriptEngine.Common
if (active[j])
{
// scan all of the markers
if ((offset[j] = src.IndexOf((string)spcarray[j-seplen], beginning)) == -1)
if ((offset[j] = src.IndexOf(spcarray[j-seplen].ToString(), beginning)) == -1)
{
// not present at all
active[j] = false;
@ -6849,11 +6854,11 @@ namespace OpenSim.Region.ScriptEngine.Common
if (best < seplen)
{
beginning = offset[best] + ((string)separray[best]).Length;
beginning = offset[best] + (separray[best].ToString()).Length;
}
else
{
beginning = offset[best] + ((string)spcarray[best - seplen]).Length;
beginning = offset[best] + (spcarray[best - seplen].ToString()).Length;
tokens.Add(spcarray[best - seplen]);
}
}