mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-26 00:40:56 +00:00
Use Bstrncpyz in 1 place; fix displaying err msg if write-opening savegame fails
git-svn-id: https://svn.eduke32.com/eduke32@2998 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
bb5d3496ee
commit
0665d961d2
4 changed files with 3 additions and 3 deletions
|
@ -8691,7 +8691,7 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
|
||||||
{
|
{
|
||||||
if (argc > i+1)
|
if (argc > i+1)
|
||||||
{
|
{
|
||||||
Bstrcpy(g_modDir,argv[i+1]);
|
Bstrncpyz(g_modDir, argv[i+1], sizeof(g_modDir));
|
||||||
G_AddPath(argv[i+1]);
|
G_AddPath(argv[i+1]);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,7 +191,6 @@ extern char boardfilename[BMAX_PATH];
|
||||||
extern const char *defaultrtsfilename[GAMECOUNT];
|
extern const char *defaultrtsfilename[GAMECOUNT];
|
||||||
extern const char *G_DefaultRtsFile(void);
|
extern const char *G_DefaultRtsFile(void);
|
||||||
|
|
||||||
extern char g_modDir[BMAX_PATH];
|
|
||||||
extern char g_modDir[BMAX_PATH];
|
extern char g_modDir[BMAX_PATH];
|
||||||
extern char inputloc;
|
extern char inputloc;
|
||||||
extern char ror_protectedsectors[MAXSECTORS];
|
extern char ror_protectedsectors[MAXSECTORS];
|
||||||
|
|
|
@ -5119,6 +5119,7 @@ repeatcase:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX
|
||||||
Bstrcpy(temp,tempbuf);
|
Bstrcpy(temp,tempbuf);
|
||||||
CONFIG_WriteSetup(1);
|
CONFIG_WriteSetup(1);
|
||||||
if (g_modDir[0] != '/')
|
if (g_modDir[0] != '/')
|
||||||
|
|
|
@ -329,9 +329,9 @@ int32_t G_SavePlayer(int32_t spot)
|
||||||
fil = fopen(temp, "wb");
|
fil = fopen(temp, "wb");
|
||||||
if (!fil)
|
if (!fil)
|
||||||
{
|
{
|
||||||
return -1;
|
|
||||||
OSD_Printf("G_SavePlayer: failed opening \"%s\" for writing: %s\n",
|
OSD_Printf("G_SavePlayer: failed opening \"%s\" for writing: %s\n",
|
||||||
temp, strerror(errno));
|
temp, strerror(errno));
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue