diff options
author | Jacek Antonelli | 2008-11-30 13:33:02 -0600 |
---|---|---|
committer | Jacek Antonelli | 2008-11-30 13:37:09 -0600 |
commit | a97da2c607517551faef928353813b8456bfcc53 (patch) | |
tree | b7893d5113e0aee695c3f53363db2a10cddde0b4 /linden/indra/lscript/lscript_compile | |
parent | Remove preprocessor condition for grid selector. (diff) | |
download | meta-impy-a97da2c607517551faef928353813b8456bfcc53.zip meta-impy-a97da2c607517551faef928353813b8456bfcc53.tar.gz meta-impy-a97da2c607517551faef928353813b8456bfcc53.tar.bz2 meta-impy-a97da2c607517551faef928353813b8456bfcc53.tar.xz |
Fixed passing nonliteral strings to *printf functions.
gcc 4.3 rejects that as being unsafe.
Patch by Stephen Zenith. [#11]
Diffstat (limited to 'linden/indra/lscript/lscript_compile')
-rw-r--r-- | linden/indra/lscript/lscript_compile/lscript_tree.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linden/indra/lscript/lscript_compile/lscript_tree.cpp b/linden/indra/lscript/lscript_compile/lscript_tree.cpp index 71e7f19..70d8195 100644 --- a/linden/indra/lscript/lscript_compile/lscript_tree.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_tree.cpp | |||
@@ -7885,10 +7885,10 @@ void LLScriptFunctionCall::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom | |||
7885 | { | 7885 | { |
7886 | // Prefix function name with g to distinguish from | 7886 | // Prefix function name with g to distinguish from |
7887 | // event handlers. | 7887 | // event handlers. |
7888 | fprintf(fp, gScriptp->getClassName()); | 7888 | fprintf(fp, "%s", gScriptp->getClassName()); |
7889 | fprintf(fp, "::'g"); | 7889 | fprintf(fp, "::'g"); |
7890 | } | 7890 | } |
7891 | fprintf(fp, mIdentifier->mName); | 7891 | fprintf(fp, "%s", mIdentifier->mName); |
7892 | fprintf(fp, "'("); | 7892 | fprintf(fp, "'("); |
7893 | print_cil_arg_list(fp, mIdentifier->mScopeEntry->mFunctionArgs); | 7893 | print_cil_arg_list(fp, mIdentifier->mScopeEntry->mFunctionArgs); |
7894 | fprintf(fp, ")\n"); | 7894 | fprintf(fp, ")\n"); |
@@ -9720,7 +9720,7 @@ void LLScriptEventHandler::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom | |||
9720 | // Allows state changing by finding handlers prefixed with new | 9720 | // Allows state changing by finding handlers prefixed with new |
9721 | // state name. Prefix disambiguates functions and event handlers. | 9721 | // state name. Prefix disambiguates functions and event handlers. |
9722 | fprintf(fp, "e"); | 9722 | fprintf(fp, "e"); |
9723 | fprintf(fp, entry->mIdentifier); | 9723 | fprintf(fp, "%s", entry->mIdentifier); |
9724 | 9724 | ||
9725 | // Handler name and arguments. | 9725 | // Handler name and arguments. |
9726 | mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); | 9726 | mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); |
@@ -10152,7 +10152,7 @@ void LLScriptGlobalFunctions::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPT | |||
10152 | fprintf(fp, ".method public hidebysig instance default "); | 10152 | fprintf(fp, ".method public hidebysig instance default "); |
10153 | print_cil_type(fp, mType ? mType->mType : LST_NULL); | 10153 | print_cil_type(fp, mType ? mType->mType : LST_NULL); |
10154 | fprintf(fp, " 'g"); | 10154 | fprintf(fp, " 'g"); |
10155 | fprintf(fp, mIdentifier->mName); | 10155 | fprintf(fp, "%s", mIdentifier->mName); |
10156 | fprintf(fp, "'"); | 10156 | fprintf(fp, "'"); |
10157 | if (mParameters) | 10157 | if (mParameters) |
10158 | { | 10158 | { |