Fix a potential sprintf to a buffer passed to it as a string argument.

git-svn-id: https://svn.eduke32.com/eduke32@2552 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-26 22:06:05 +00:00
parent af9db8cfa2
commit 68f0842b85

View file

@ -9389,7 +9389,9 @@ static void G_CompileScripts(void)
pathsearchmode = 1;
if (g_skipDefaultCons == 0)
{
Bsprintf(g_scriptNamePtr,"%s",defaultconfile());
const char *cp = defaultconfile();
if (cp != g_scriptNamePtr)
Bsprintf(g_scriptNamePtr, "%s", cp);
}
C_Compile(g_scriptNamePtr);
@ -9397,7 +9399,9 @@ static void G_CompileScripts(void)
{
if (g_skipDefaultCons == 0)
{
Bsprintf(g_scriptNamePtr,"%s",defaultconfile());
const char *cp = defaultconfile();
if (cp != g_scriptNamePtr)
Bsprintf(g_scriptNamePtr, "%s", cp);
}
C_Compile(g_scriptNamePtr);
}