Skip to content

Commit

Permalink
Fixed off-by-one error in findBinaryInPath() (thanks, Dmitry!).
Browse files Browse the repository at this point in the history
This bug is new to the development branch, and doesn't exist in either the
 stable-1.0 or stable-2.0 branches.
  • Loading branch information
icculus committed Jul 16, 2013
1 parent 4eafb44 commit 7a42f7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/CREDITS.txt
Expand Up @@ -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 ...

Expand Down
2 changes: 1 addition & 1 deletion src/platform_unix.c
Expand Up @@ -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 */

Expand Down

0 comments on commit 7a42f7d

Please sign in to comment.