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
|
|
@ -120,7 +120,7 @@ char **envp;
|
|||
strncpy(whoami, argv[2], LINLEN);
|
||||
whoami[LINLEN - 1] = '\0';
|
||||
use_savedir = TRUE;
|
||||
if (snprintf(file_name, LINLEN, "%s%d-%.10s.srsav", SAVEDIR,
|
||||
if (snprintf(file_name, LINLEN, "%s/%d-%.10s.srsav", SAVEDIR,
|
||||
playuid, whoami) >= LINLEN) {
|
||||
/* Just in case it doesn't fit */
|
||||
strcpy(file_name, "srogue.save");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue