Mapster32: fix specifying a custom configuration file with -cfg.

We were writing into a string literal. Ouch!

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

View file

@ -66,7 +66,7 @@ char defsfilename[BMAX_PATH] = "duke3d.def";
static char levelname[BMAX_PATH];
// static char *startwin_labeltext = "Starting Mapster32...";
static char *setupfilename = "mapster32.cfg";
static char setupfilename[BMAX_PATH] = "mapster32.cfg";
static char defaultduke3dgrp[BMAX_PATH] = "duke3d.grp";
static char *g_grpNamePtr = defaultduke3dgrp;
char *g_defNamePtr = defsfilename;
@ -8493,7 +8493,7 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
{
if (argc > i+1)
{
Bstrcpy(setupfilename,argv[i+1]);
Bstrncpyz(setupfilename, argv[i+1], sizeof(setupfilename));
i++;
}
i++;