src/platform_unix.c
changeset 1333 baecd71ae0e7
parent 1266 135cb99a06a0
child 1337 3b2e649c044c
--- a/src/platform_unix.c	Fri Nov 30 14:37:37 2012 -0500
+++ b/src/platform_unix.c	Tue Jul 16 12:51:54 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 */