aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llurlsimstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llurlsimstring.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/linden/indra/newview/llurlsimstring.cpp b/linden/indra/newview/llurlsimstring.cpp
index 931cf7b..07669db 100644
--- a/linden/indra/newview/llurlsimstring.cpp
+++ b/linden/indra/newview/llurlsimstring.cpp
@@ -73,7 +73,7 @@ void LLURLSimString::setString(const LLString& sim_string)
73 73
74// "/100" -> 100 74// "/100" -> 100
75// static 75// static
76S32 LLURLSimString::parseGridIdx(const LLString& in_string, S32 idx0, S32* res, S32 max) 76S32 LLURLSimString::parseGridIdx(const LLString& in_string, S32 idx0, S32* res)
77{ 77{
78 if (idx0 == LLString::npos || in_string[idx0] != '/') 78 if (idx0 == LLString::npos || in_string[idx0] != '/')
79 { 79 {
@@ -86,7 +86,7 @@ S32 LLURLSimString::parseGridIdx(const LLString& in_string, S32 idx0, S32* res,
86 if (!tstring.empty()) 86 if (!tstring.empty())
87 { 87 {
88 S32 val = atoi(tstring.c_str()); 88 S32 val = atoi(tstring.c_str());
89 *res = llclamp(val,0,max); 89 *res = val;
90 } 90 }
91 return idx1; 91 return idx1;
92} 92}
@@ -132,9 +132,9 @@ bool LLURLSimString::parse(const LLString& sim_string, std::string *region_name,
132 { 132 {
133 if (idx1 != std::string::npos) 133 if (idx1 != std::string::npos)
134 { 134 {
135 idx1 = parseGridIdx(sim_string, idx1, x, 255); 135 idx1 = parseGridIdx(sim_string, idx1, x);
136 idx1 = parseGridIdx(sim_string, idx1, y, 255); 136 idx1 = parseGridIdx(sim_string, idx1, y);
137 idx1 = parseGridIdx(sim_string, idx1, z, 1000); 137 idx1 = parseGridIdx(sim_string, idx1, z);
138 } 138 }
139 return true; 139 return true;
140 } 140 }