misc/libphysfs/platform_unix.c
changeset 9799 a3fe81c3bc02
parent 8524 a65e9bcf0a03
child 12213 bb5522e88ab2
--- a/misc/libphysfs/platform_unix.c	Sun Dec 15 14:05:42 2013 -0500
+++ b/misc/libphysfs/platform_unix.c	Wed Dec 25 23:23:48 2013 +0400
@@ -193,7 +193,7 @@
 
         if (access(exe, X_OK) == 0)  /* Exists as executable? We're done. */
         {
-            exe[size - binlen] = '\0'; /* chop off filename, leave '/' */
+            exe[size - binlen - 1] = '\0'; /* chop off filename, leave '/' */
             return exe;
         } /* if */