diff -r 1fdc1507e42d -r a3fe81c3bc02 misc/libphysfs/platform_unix.c --- 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 */