Many databases contain folders with invalid folder ID. Folder IDs are

supposed to be within -1 .. 22 and other values break inventory loading.
This patch fixes it and allows inventory to load. Invalid folder types
will be treated as ordinary folders.
remotes/origin/0.6.7-post-fixes
Melanie 2009-09-10 00:33:00 +01:00
parent df9f80aabd
commit 0034dd043f
1 changed files with 1 additions and 1 deletions

View File

@ -502,7 +502,7 @@ namespace OpenSim.Framework.Capabilities
llsdFolder.folder_id = invFolder.ID;
llsdFolder.parent_id = invFolder.ParentID;
llsdFolder.name = invFolder.Name;
if (invFolder.Type == -1)
if (invFolder.Type < 0 || invFolder.Type >= TaskInventoryItem.Types.Length)
llsdFolder.type = "-1";
else
llsdFolder.type = TaskInventoryItem.Types[invFolder.Type];