aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llinventory/llsaleinfo.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-01 17:39:58 -0600
committerJacek Antonelli2008-12-01 17:40:06 -0600
commit7abecb48babe6a6f09bf6692ba55076546cfced9 (patch)
tree8d18a88513fb97adf32c10aae78f4be1984942db /linden/indra/llinventory/llsaleinfo.cpp
parentSecond Life viewer sources 1.21.6 (diff)
downloadmeta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.zip
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.gz
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.bz2
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.xz
Second Life viewer sources 1.22.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/llinventory/llsaleinfo.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/linden/indra/llinventory/llsaleinfo.cpp b/linden/indra/llinventory/llsaleinfo.cpp
index 4895378..fef6b05 100644
--- a/linden/indra/llinventory/llsaleinfo.cpp
+++ b/linden/indra/llinventory/llsaleinfo.cpp
@@ -114,7 +114,16 @@ bool LLSaleInfo::fromLLSD(LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
114{ 114{
115 const char *w; 115 const char *w;
116 116
117 mSaleType = lookup(sd["sale_type"].asString().c_str()); 117 if (sd["sale_type"].isString())
118 {
119 mSaleType = lookup(sd["sale_type"].asString().c_str());
120 }
121 else if(sd["sale_type"].isInteger())
122 {
123 S8 type = (U8)sd["sale_type"].asInteger();
124 mSaleType = static_cast<LLSaleInfo::EForSale>(type);
125 }
126
118 mSalePrice = llclamp(sd["sale_price"].asInteger(), 0, S32_MAX); 127 mSalePrice = llclamp(sd["sale_price"].asInteger(), 0, S32_MAX);
119 w = "perm_mask"; 128 w = "perm_mask";
120 if (sd.has(w)) 129 if (sd.has(w))