Merge pull request #2184 from Ansariel/altasaurus_underflow

Fix integer underflow causing issues with wearables
meow-7.2.2
Brad Linden 2024-08-02 16:00:01 -07:00 committed by GitHub
commit fcaf6ff829
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -2133,11 +2133,11 @@ void LLAppearanceMgr::filterWearableItems(
items.clear();
for (S32 i=0; i<LLWearableType::WT_COUNT; i++)
{
auto size = items_by_type[i].size();
S32 size = (S32)items_by_type[i].size();
if (size <= 0)
continue;
auto start_index = llmax(0,size-max_per_type);
for (size_t j = start_index; j<size; j++)
S32 start_index = llmax(0,size-max_per_type);
for (S32 j = start_index; j<size; j++)
{
items.push_back(items_by_type[i][j]);
}