diff arogue5/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 46f39359c4a7
children f2951c4e28d9
line wrap: on
line diff
--- a/arogue5/main.c	Tue Aug 27 09:25:30 2013 -0700
+++ b/arogue5/main.c	Tue Aug 27 22:25:40 2013 -0700
@@ -64,7 +64,7 @@
         use_savedir = TRUE;
         strncpy(whoami, argv[2], LINELEN);
         whoami[LINELEN - 1] = '\0';
-        if (snprintf(file_name, LINELEN, "%s%d-%.10s.ar5sav", SAVEDIR, 
+        if (snprintf(file_name, LINELEN, "%s/%d-%.10s.ar5sav", SAVEDIR, 
                      md_getuid(), whoami) >= LINELEN)
         {
             /* The name is too long */