summaryrefslogtreecommitdiff
path: root/indra/llinventory/llpermissions.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-04-30 23:45:22 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-05-05 18:28:08 +0300
commitf73e0d09aabd17f778ce802353dea5c5aae007be (patch)
tree9bd26aee05f8981fb07c6af0c260bd85d0d36f19 /indra/llinventory/llpermissions.cpp
parent778a69c6e1783ea6c9c7ac3102990646ff2e38da (diff)
#3905 Crashes in LLInventoryModel::saveToFile
I don't expect it to fix the problem. Just making things more explicit in places of most frequent crashes.
Diffstat (limited to 'indra/llinventory/llpermissions.cpp')
-rw-r--r--indra/llinventory/llpermissions.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp
index c8963881df..d800ca02c9 100644
--- a/indra/llinventory/llpermissions.cpp
+++ b/indra/llinventory/llpermissions.cpp
@@ -1012,17 +1012,21 @@ static const std::string PERM_NEXT_OWNER_MASK_LABEL("next_owner_mask");
LLSD ll_create_sd_from_permissions(const LLPermissions& perm)
{
LLSD rv;
+ ll_fill_sd_from_permissions(rv, perm);
+ return rv;
+}
+void ll_fill_sd_from_permissions(LLSD& rv, const LLPermissions& perm)
+{
rv[PERM_CREATOR_ID_LABEL] = perm.getCreator();
rv[PERM_OWNER_ID_LABEL] = perm.getOwner();
rv[PERM_LAST_OWNER_ID_LABEL] = perm.getLastOwner();
rv[PERM_GROUP_ID_LABEL] = perm.getGroup();
rv[PERM_IS_OWNER_GROUP_LABEL] = perm.isGroupOwned();
- rv[PERM_BASE_MASK_LABEL] = (S32)perm.getMaskBase();
- rv[PERM_OWNER_MASK_LABEL] = (S32)perm.getMaskOwner();
- rv[PERM_GROUP_MASK_LABEL] = (S32)perm.getMaskGroup();
- rv[PERM_EVERYONE_MASK_LABEL] = (S32)perm.getMaskEveryone();
- rv[PERM_NEXT_OWNER_MASK_LABEL] = (S32)perm.getMaskNextOwner();
- return rv;
+ rv[PERM_BASE_MASK_LABEL] = (LLSD::Integer)perm.getMaskBase();
+ rv[PERM_OWNER_MASK_LABEL] = (LLSD::Integer)perm.getMaskOwner();
+ rv[PERM_GROUP_MASK_LABEL] = (LLSD::Integer)perm.getMaskGroup();
+ rv[PERM_EVERYONE_MASK_LABEL] = (LLSD::Integer)perm.getMaskEveryone();
+ rv[PERM_NEXT_OWNER_MASK_LABEL] = (LLSD::Integer)perm.getMaskNextOwner();
}
LLPermissions ll_permissions_from_sd(const LLSD& sd_perm)