diff options
| author | Oz Linden <oz@lindenlab.com> | 2013-10-15 17:47:37 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2013-10-15 17:47:37 -0400 |
| commit | 9c313aea13c70db145d3f2ba840fdc34ed8c8adf (patch) | |
| tree | 72b76053aac0fedf411145b0427b2239971034b1 /indra/newview/llworldmap.cpp | |
| parent | 1e32b9dd33fb9e2f0d9a7935a3696b423a191354 (diff) | |
| parent | 8dc273b942ca3bae7469dcbaf7bab171b889eea1 (diff) | |
merge changes for DRTVWR-336
Diffstat (limited to 'indra/newview/llworldmap.cpp')
| -rwxr-xr-x | indra/newview/llworldmap.cpp | 11 |
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) |
