summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 9a090be76a..4645b9bf59 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -612,10 +612,7 @@ void LLViewerInventoryCategory::determineFolderType()
return;
if (item->getInventoryType() == LLInventoryType::IT_WEARABLE)
{
- U32 flags = item->getFlags();
- if (flags > WT_COUNT)
- return;
- const EWearableType wearable_type = EWearableType(flags);
+ const EWearableType wearable_type = EWearableType(item->getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK);
const std::string& wearable_name = LLWearableDictionary::getTypeName(wearable_type);
U64 valid_folder_types = LLFolderType::lookupValidFolderTypes(wearable_name);
folder_valid |= valid_folder_types;