From b3f8a0482373d88cf4dc4d52c0f07a97e84bad9c Mon Sep 17 00:00:00 2001 From: Bryan O'Sullivan Date: Fri, 31 Oct 2008 18:51:42 +0000 Subject: Fix more silly printf crasher holes --- indra/lscript/lscript_compile/lscript_tree.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/lscript') diff --git a/indra/lscript/lscript_compile/lscript_tree.cpp b/indra/lscript/lscript_compile/lscript_tree.cpp index 69485f05f9..66f8825845 100644 --- a/indra/lscript/lscript_compile/lscript_tree.cpp +++ b/indra/lscript/lscript_compile/lscript_tree.cpp @@ -7886,10 +7886,10 @@ void LLScriptFunctionCall::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom { // Prefix function name with g to distinguish from // event handlers. - fprintf(fp, gScriptp->getClassName()); + fprintf(fp, "%s", gScriptp->getClassName()); fprintf(fp, "::'g"); } - fprintf(fp, mIdentifier->mName); + fprintf(fp, "%s", mIdentifier->mName); fprintf(fp, "'("); print_cil_arg_list(fp, mIdentifier->mScopeEntry->mFunctionArgs); fprintf(fp, ")\n"); @@ -9741,7 +9741,7 @@ void LLScriptEventHandler::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom // Allows state changing by finding handlers prefixed with new // state name. Prefix disambiguates functions and event handlers. fprintf(fp, "e"); - fprintf(fp, entry->mIdentifier); + fprintf(fp, "%s", entry->mIdentifier); // Handler name and arguments. mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); @@ -10173,7 +10173,7 @@ void LLScriptGlobalFunctions::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPT fprintf(fp, ".method public hidebysig instance default "); print_cil_type(fp, mType ? mType->mType : LST_NULL); fprintf(fp, " 'g"); - fprintf(fp, mIdentifier->mName); + fprintf(fp, "%s", mIdentifier->mName); fprintf(fp, "'"); if (mParameters) { -- cgit v1.2.3