diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-01-23 13:59:56 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-01-23 13:59:56 +0800 |
commit | a9a601de76da660a454fab779395ab4959765b7a (patch) | |
tree | 5f412d2c9d764086099071ecfe8dc0e925318e55 /indra/llinventory | |
parent | 3437b6d6f5328c5f067f718ef5ae378d97427f05 (diff) | |
parent | ad30637ebe987a126302dc7fd978e0bfb988ccb1 (diff) |
Merge remote-tracking branch 'secondlife/release/2024.12-ForeverFPS' into 2024.12-ForeverFPS
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llinventory.cpp | 2 | ||||
-rw-r--r-- | indra/llinventory/llsaleinfo.cpp | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 082d8b2f9f..075abf9536 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -918,7 +918,7 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const } //sd[INV_FLAGS_LABEL] = (S32)mFlags; sd[INV_FLAGS_LABEL] = ll_sd_from_U32(mFlags); - sd[INV_SALE_INFO_LABEL] = mSaleInfo; + sd[INV_SALE_INFO_LABEL] = mSaleInfo.asLLSD(); sd[INV_NAME_LABEL] = mName; sd[INV_DESC_LABEL] = mDescription; sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate; diff --git a/indra/llinventory/llsaleinfo.cpp b/indra/llinventory/llsaleinfo.cpp index 98836b178e..35bbc1dbb1 100644 --- a/indra/llinventory/llsaleinfo.cpp +++ b/indra/llinventory/llsaleinfo.cpp @@ -89,8 +89,14 @@ bool LLSaleInfo::exportLegacyStream(std::ostream& output_stream) const LLSD LLSaleInfo::asLLSD() const { - LLSD sd = LLSD(); - sd["sale_type"] = lookup(mSaleType); + LLSD sd; + const char* type = lookup(mSaleType); + if (!type) + { + LL_WARNS_ONCE() << "Unknown sale type: " << mSaleType << LL_ENDL; + type = lookup(LLSaleInfo::FS_NOT); + } + sd["sale_type"] = type; sd["sale_price"] = mSalePrice; return sd; } |