Fix possible array indexing exception in inventory server

afrisby
Jeff Ames 2007-12-11 18:45:07 +00:00
parent 60c96ab687
commit bb408af14d
1 changed files with 2 additions and 4 deletions

View File

@ -182,11 +182,10 @@ namespace OpenSim.Grid.InventoryServer
byte[] result = new byte[] { };
string[] parms = path.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
if (parms.Length >= 1)
if (parms.Length > 1)
{
if (string.Compare(parms[1], "library", true) == 0)
{
MemoryStream ms = new MemoryStream();
saveInventoryToStream(_inventory, ms);
@ -195,7 +194,7 @@ namespace OpenSim.Grid.InventoryServer
}
else if (string.Compare(parms[1], "user", true) == 0)
{
if (parms.Length >= 2)
if (parms.Length > 2)
{
result = GetUserInventory(new LLUUID(parms[2]));
}
@ -204,6 +203,5 @@ namespace OpenSim.Grid.InventoryServer
return result;
}
}
}
}