From 0034dd043fb1e997f5b9ef12c42ab36e3c984765 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 10 Sep 2009 00:33:00 +0100 Subject: 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. --- OpenSim/Framework/Capabilities/Caps.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Framework/Capabilities') diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index 665bfe5..1dfb2d4 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs @@ -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]; -- cgit v1.1