* cygcheck.cc (find_on_path): Create copy of rv on successful access
check, since rv can be reused in subsequent calls.
This commit is contained in:
parent
86fdf2166a
commit
e699adfce5
|
@ -1,3 +1,8 @@
|
|||
2006-02-08 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* cygcheck.cc (find_on_path): Create copy of rv on successful access
|
||||
check, since rv can be reused in subsequent calls.
|
||||
|
||||
2006-01-19 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* cygcheck.cc (common_paths): Add "patch".
|
||||
|
|
|
@ -275,7 +275,7 @@ find_on_path (char *file, char *default_extension,
|
|||
return fn;
|
||||
strcpy (rv, fn);
|
||||
strcat (rv, default_extension);
|
||||
return access (rv, F_OK) == 0 ? rv : fn;
|
||||
return access (rv, F_OK) == 0 ? strdup (rv) : fn;
|
||||
}
|
||||
|
||||
if (strchr (file, '.'))
|
||||
|
|
Loading…
Reference in New Issue