fix the protection for more Wearables than region suports

avinationmerge
UbitUmarov 2015-11-15 08:16:52 +00:00
parent 554d4bad8d
commit bcb27d4406
1 changed files with 9 additions and 6 deletions

View File

@ -760,7 +760,10 @@ namespace OpenSim.Framework
if ((data != null) && (data["wearables"] != null) && (data["wearables"]).Type == OSDType.Array)
{
OSDArray wears = (OSDArray)(data["wearables"]);
for (int i = 0; i < wears.Count; i++)
int count = wears.Count;
if (count > AvatarWearable.MAX_WEARABLES)
count = AvatarWearable.MAX_WEARABLES;
for (int i = 0; i < count; i++)
m_wearables[i] = new AvatarWearable((OSDArray)wears[i]);
}
else