diff options
Diffstat (limited to 'linden/indra/llinventory/llsaleinfo.cpp')
-rw-r--r-- | linden/indra/llinventory/llsaleinfo.cpp | 11 |
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)) |