Mercurial > hg > early-roguelike
diff rogue3/main.c @ 95:88ab59f06dfc
Make sure file_name contains '/' between SAVEDIR and the file name.
Duplicated slashes are not a problem. Missing slashes are.
author | John "Elwin" Edwards |
---|---|
date | Tue, 27 Aug 2013 22:25:40 -0700 |
parents | 2dcd75e6a736 |
children | ee250e3646fd |
line wrap: on
line diff
--- a/rogue3/main.c Tue Aug 27 09:25:30 2013 -0700 +++ b/rogue3/main.c Tue Aug 27 22:25:40 2013 -0700 @@ -71,7 +71,7 @@ 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");