diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-05-23 23:08:14 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-05-23 23:08:14 +0300 |
commit | 747a7541a57dbc0ef927e8173dca82100f81fe8a (patch) | |
tree | faf416360c1f703c14b63de6eff8124c0cfbc231 /indra | |
parent | 3befc1b988c0eae0d344b31a361166c734c91a3d (diff) |
STORM-1256 WIP Fixed a crash.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llwlparammanager.h | 8 |
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 |