]> skyeroc.xyz Git - dgamelaunch/commitdiff
fix canned rcfile path
authorJoshua Kwan <joshk@triplehelix.org>
Fri, 23 Jan 2004 18:33:35 +0000 (18:33 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Fri, 23 Jan 2004 18:33:35 +0000 (18:33 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@157 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c

index ac71e5058e352878d5c81d7ff8f2a09580ab181a..2e808ed0ae8d302ef13fc46da2e3a0d7ab69c48f 100644 (file)
@@ -1131,9 +1131,9 @@ write_canned_rcfile (char *target)
   char buf[1024], *rfn;
   size_t bytes, len;
 
-  len = strlen(myconfig->dglroot) + strlen(myconfig->rcfile) + 1;
+  len = strlen(myconfig->rcfile) + 2;
   rfn = malloc(len);
-  snprintf (rfn, len, "%s%s", myconfig->dglroot, myconfig->rcfile);
+  snprintf (rfn, len, "/%s", myconfig->rcfile);
 
   if (!(newfile = fopen (target, "w")))
     {
@@ -1179,7 +1179,6 @@ editoptions ()
   pid_t editor;
 
   rcfile = fopen (rcfilename, "r");
-  printf (" read");
   if (!rcfile)                  /* should not really happen except for old users */
     write_canned_rcfile (rcfilename);