summaryrefslogtreecommitdiff
path: root/indra/newview/llworldmap.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-10-28 12:14:27 -0700
committerMerov Linden <merov@lindenlab.com>2013-10-28 12:14:27 -0700
commit026b528b86a853a923ec87dd3897fe2079cbd539 (patch)
treeb31ec200f751a5c0817a6e628ae6e6c4f394bf77 /indra/newview/llworldmap.cpp
parentee74eb1a9ee8e2aba49613cf434f1272a4526417 (diff)
parentea1e1b0925b386cf83178539b8eae9e25c573548 (diff)
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llworldmap.cpp')
-rwxr-xr-xindra/newview/llworldmap.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index 5fa380e0e3..bfae142812 100755
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -522,6 +522,17 @@ bool LLWorldMap::insertItem(U32 x_world, U32 y_world, std::string& name, LLUUID&
tooltip_fmt.setArg("[AREA]", llformat("%d", extra));
tooltip_fmt.setArg("[PRICE]", llformat("%d", extra2));
+
+ // Check for division by zero
+ if (extra != 0)
+ {
+ tooltip_fmt.setArg("[SQMPRICE]", llformat("%.1f", (F32)extra2 / (F32)extra));
+ }
+ else
+ {
+ tooltip_fmt.setArg("[SQMPRICE]", LLTrans::getString("Unknown"));
+ }
+
new_item.setTooltip(tooltip_fmt.getString());
if (type == MAP_ITEM_LAND_FOR_SALE)