summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llwlparammanager.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h
index af3b9aec13..35acb7c5d6 100644
--- a/indra/newview/llwlparammanager.h
+++ b/indra/newview/llwlparammanager.h
@@ -144,9 +144,13 @@ public:
}
inline LLWLParamKey(std::string& stringVal)
- : name(stringVal.substr(0, stringVal.length()-1)),
- scope((EScope)atoi(stringVal.substr(stringVal.length()-1, stringVal.length()).c_str()))
{
+ size_t len = stringVal.length();
+ if (len > 0)
+ {
+ name = stringVal.substr(0, len - 1);
+ scope = (EScope) atoi(stringVal.substr(len - 1, len).c_str());
+ }
}
inline std::string toStringVal() const