diff rogue4/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 24e6beb9e7aa
children f2951c4e28d9
line wrap: on
line diff
--- a/rogue4/main.c	Tue Aug 27 09:25:30 2013 -0700
+++ b/rogue4/main.c	Tue Aug 27 22:25:40 2013 -0700
@@ -78,7 +78,7 @@
         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 */