summaryrefslogtreecommitdiff
path: root/indra/lscript/lscript_library/lscript_library.cpp
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2008-06-02 21:14:31 +0000
committerBryan O'Sullivan <bos@lindenlab.com>2008-06-02 21:14:31 +0000
commit9db949eec327df4173fde3de934a87bedb0db13c (patch)
treeaeffa0f0e68b1d2ceb74d460cbbd22652c9cd159 /indra/lscript/lscript_library/lscript_library.cpp
parent419e13d0acaabf5e1e02e9b64a07648bce822b2f (diff)
svn merge -r88066:88786 svn+ssh://svn.lindenlab.com/svn/linden/branches/cmake-9-merge
dataserver-is-deprecated for-fucks-sake-whats-with-these-commit-markers
Diffstat (limited to 'indra/lscript/lscript_library/lscript_library.cpp')
-rw-r--r--indra/lscript/lscript_library/lscript_library.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp
index 3a5b6eacc0..0b357c9182 100644
--- a/indra/lscript/lscript_library/lscript_library.cpp
+++ b/indra/lscript/lscript_library/lscript_library.cpp
@@ -468,14 +468,14 @@ void LLScriptLibrary::init()
//addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llSetForSale", "i", "ii", "integer llSetForSale(integer selltype, integer price)\nSets this object for sale in mode selltype for price. Returns TRUE if successfully set for sale."));
-LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), char *name, char *ret_type, char *args, char *desc, BOOL god_only)
+LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), const char *name, const char *ret_type, const char *args, const char *desc, BOOL god_only)
: mEnergyUse(eu), mSleepTime(st), mExecFunc(exec_func), mName(name), mReturnType(ret_type), mArgs(args), mGodOnly(god_only)
{
- mDesc = new char[512];
+ char *mDesc_ = new char[512];
if (mSleepTime)
{
snprintf( /* Flawfinder: ignore */
- mDesc,
+ mDesc_,
512,
"%s\nSleeps script for %.1f seconds.",
desc,
@@ -483,9 +483,10 @@ LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_fun
}
else
{
- strncpy(mDesc, desc, 512); /* Flawfinder: ignore */
- mDesc[511] = '\0'; // just in case.
+ strncpy(mDesc_, desc, 512); /* Flawfinder: ignore */
+ mDesc_[511] = '\0'; // just in case.
}
+ mDesc = mDesc_;
}
LLScriptLibraryFunction::~LLScriptLibraryFunction()
@@ -509,7 +510,7 @@ void LLScriptLibrary::addFunction(LLScriptLibraryFunction *func)
mNextNumber++;
}
-void LLScriptLibrary::assignExec(char *name, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &))
+void LLScriptLibrary::assignExec(const char *name, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &))
{
S32 i;
for (i = 0; i < mNextNumber; i++)