mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r16410) -Fix (r16307): don't assume the extension starts with the first '.', but with the last '.'. This way depend doesn't fail if there's a dot in your path, e.g. 'gcc-4.4'.
This commit is contained in:
parent
65d2a381d9
commit
a661b157ad
@ -645,7 +645,7 @@ void ScanFile(const char *filename, const char *ext, bool header, bool verbose)
|
||||
/* Replace the extension with the provided extension of '.o'. */
|
||||
char path[PATH_MAX];
|
||||
strcpy(path, filename);
|
||||
*(strchr(path, '.')) = '\0';
|
||||
*(strrchr(path, '.')) = '\0';
|
||||
strcat(path, ext != NULL ? ext : ".o");
|
||||
curfile = _files.find(path);
|
||||
if (curfile == _files.end()) {
|
||||
|
Loading…
Reference in New Issue
Block a user