Fixed base directory determination.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 29 Aug 2001 03:31:43 +0000
changeset 79 5dbb03944ef0
parent 78 04707875f982
child 80 e0f3c372cb9d
Fixed base directory determination.
CHANGELOG
platform/unix.c
--- a/CHANGELOG	Wed Aug 29 03:11:23 2001 +0000
+++ b/CHANGELOG	Wed Aug 29 03:31:43 2001 +0000
@@ -17,7 +17,9 @@
            Changed version to 0.1.2.
 08282001 - win32.c now checks HOMEDRIVE, HOMEPATH, and HOME when calculating
            the userdir. Added include files that make it a little closer to
-           compiling under Cygwin. Added a TODO file.
+           compiling under Cygwin. Added a TODO file. Fixed unix.c's
+           __PHYSFS_platformCalcBaseDir() so that it actually works.
+           Changed version to 0.1.3.
 
 --ryan. (icculus@clutteredmind.org)
 
--- a/platform/unix.c	Wed Aug 29 03:11:23 2001 +0000
+++ b/platform/unix.c	Wed Aug 29 03:31:43 2001 +0000
@@ -135,9 +135,9 @@
             BAIL_IF_MACRO(1, ERR_OUT_OF_MEMORY, NULL);
         } /* if */
         strcpy(exe, start);
-        if (start[strlen(start) - 1] != '/')
-            strcat(start, "/");
-        strcat(start, argv0);
+        if (exe[strlen(exe) - 1] != '/')
+            strcat(exe, "/");
+        strcat(exe, argv0);
         if (access(exe, X_OK) != 0)
             free(exe);
         else