summaryrefslogtreecommitdiff
path: root/indra/lscript/lscript_library.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/lscript/lscript_library.h')
-rw-r--r--indra/lscript/lscript_library.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/lscript/lscript_library.h b/indra/lscript/lscript_library.h
index 48a566de3e..74356256ae 100644
--- a/indra/lscript/lscript_library.h
+++ b/indra/lscript/lscript_library.h
@@ -387,8 +387,10 @@ public:
LLScriptLibData(const LLUUID &id) : mType(LST_KEY), mInteger(0), mFP(0.f), mKey(NULL), mString(NULL), mVec(), mQuat(), mListp(NULL)
{
- mKey = new char[UUID_STR_LENGTH];
- id.toString(mKey);
+ std::string idstr;
+ id.toString(idstr);
+ mKey = new char[idstr.length()+1];
+ LLStringUtil::copy(mKey,idstr.c_str(),idstr.length()+1);
}
LLScriptLibData(const char *string) : mType(LST_STRING), mInteger(0), mFP(0.f), mKey(NULL), mString(NULL), mVec(), mQuat(), mListp(NULL)