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
|
|
@ -71,7 +71,7 @@ char **envp;
|
|||
whoami[79] = '\0';
|
||||
use_savedir = TRUE;
|
||||
/* look for savefile at SAVEDIR/UID-playername.r3sav */
|
||||
if (snprintf(file_name, 80, "%s%d-%.10s.r3sav", SAVEDIR, md_getuid(), whoami) >= 80)
|
||||
if (snprintf(file_name, 80, "%s/%d-%.10s.r3sav", SAVEDIR, md_getuid(), whoami) >= 80)
|
||||
{
|
||||
/* this shouldn't happen */
|
||||
strcpy(file_name, "rogue3.save");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue