summaryrefslogtreecommitdiff
path: root/indra/newview/llslurl.cpp
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2011-08-22 13:16:58 -0700
committerRichard Nelson <richard@lindenlab.com>2011-08-22 13:16:58 -0700
commit56453f2982464b6d5c86c23e0e75f5adcdd0edff (patch)
tree3d420b3b64ecf6deb4534cf24a0ed16649b7b557 /indra/newview/llslurl.cpp
parentc8712fb180aedf84dc48ade636ec0aae8d905bf7 (diff)
EXP-1129 FIX SLURLs with only 2 coordinates are interpreted as center of sim
reviewed by Leslie
Diffstat (limited to 'indra/newview/llslurl.cpp')
-rw-r--r--indra/newview/llslurl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index 4cf1df1655..a853726dea 100644
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -273,11 +273,11 @@ LLSLURL::LLSLURL(const std::string& slurl)
mRegion = LLURI::unescape(path_array[0].asString());
path_array.erase(0);
- // parse the x, y, z
- if(path_array.size() >= 3)
+ // parse the x, y, and optionally z
+ if(path_array.size() >= 2)
{
- mPosition = LLVector3(path_array);
+ mPosition = LLVector3(path_array); // this construction handles LLSD without all components (values default to 0.f)
if((F32(mPosition[VX]) < 0.f) ||
(mPosition[VX] > REGION_WIDTH_METERS) ||
(F32(mPosition[VY]) < 0.f) ||