Mercurial > hg > early-roguelike
diff srogue/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 | 8757a0593e6e |
children | 1e88eb1942a5 |
line wrap: on
line diff
--- a/srogue/main.c Tue Aug 27 09:25:30 2013 -0700 +++ b/srogue/main.c Tue Aug 27 22:25:40 2013 -0700 @@ -120,7 +120,7 @@ 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");