add limites checks on wearables size, revert to max 15 for

compatibility/testing
This commit is contained in:
UbitUmarov
2014-08-07 23:29:31 +01:00
parent 7486684436
commit 4ae0bb7df1
3 changed files with 19 additions and 6 deletions

View File

@@ -665,7 +665,12 @@ namespace OpenSim.Framework
if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array)
{
OSDArray wears = (OSDArray)(args["wearables"]);
for (int i = 0; i < wears.Count / 2; i++)
int count = wears.Count;
if (count > AvatarWearable.MAX_WEARABLES)
count = AvatarWearable.MAX_WEARABLES;
for (int i = 0; i < count / 2; i++)
{
AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]);
Appearance.SetWearable(i,awear);