diff --git a/docs/CREDITS.txt b/docs/CREDITS.txt index 796f74f..b961e72 100644 --- a/docs/CREDITS.txt +++ b/docs/CREDITS.txt @@ -133,6 +133,9 @@ Haiku fixes: SLB archiver: Aleksi Nurmi +Bug fixes: + Dmitry Marakasov + Other stuff: Your name here! Patches go to icculus@icculus.org ... diff --git a/src/platform_unix.c b/src/platform_unix.c index 51af43a..cb58bdb 100644 --- a/src/platform_unix.c +++ b/src/platform_unix.c @@ -193,7 +193,7 @@ static char *findBinaryInPath(const char *bin, char *envr) 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 */