Fixed off-by-one error in findBinaryInPath() (thanks, Dmitry!).
This bug is new to the development branch, and doesn't exist in either the stable-1.0 or stable-2.0 branches.
This commit is contained in:
parent
4eafb44817
commit
7a42f7dd41
|
@ -133,6 +133,9 @@ Haiku fixes:
|
||||||
SLB archiver:
|
SLB archiver:
|
||||||
Aleksi Nurmi
|
Aleksi Nurmi
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
Dmitry Marakasov
|
||||||
|
|
||||||
Other stuff:
|
Other stuff:
|
||||||
Your name here! Patches go to icculus@icculus.org ...
|
Your name here! Patches go to icculus@icculus.org ...
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ static char *findBinaryInPath(const char *bin, char *envr)
|
||||||
|
|
||||||
if (access(exe, X_OK) == 0) /* Exists as executable? We're done. */
|
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;
|
return exe;
|
||||||
} /* if */
|
} /* if */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue