diff -r 31570b766315 -r ed5a6478e710 misc/libphysfs/platform_unix.c --- a/misc/libphysfs/platform_unix.c Tue Nov 10 18:16:35 2015 +0100 +++ b/misc/libphysfs/platform_unix.c Tue Nov 10 20:43:13 2015 +0100 @@ -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 */