Make sure file_name contains '/' between SAVEDIR and the file name.
Duplicated slashes are not a problem. Missing slashes are.
This commit is contained in:
parent
5a25cd89da
commit
1f1ae55a26
4 changed files with 4 additions and 4 deletions
|
|
@ -78,7 +78,7 @@ char **envp;
|
|||
whoami[MAXSTR - 1] = '\0'; /* insurance */
|
||||
use_savedir = TRUE;
|
||||
/* look for savefile at SAVEDIR/UID-playername.r4sav */
|
||||
if (snprintf(file_name, MAXSTR, "%s%d-%.10s.r4sav", SAVEDIR,
|
||||
if (snprintf(file_name, MAXSTR, "%s/%d-%.10s.r4sav", SAVEDIR,
|
||||
md_getuid(), whoami) >= MAXSTR)
|
||||
{
|
||||
/* Name is too long- this shouldn't happen */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue