summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-24 09:35:46 +0000
committerrubidium <rubidium@openttd.org>2009-05-24 09:35:46 +0000
commit299f34b32bfb2dbaba2dd0cb8865a16afefa2e85 (patch)
tree2631b56a671b24fd2a82a9209442ab30240851b7 /src
parentde1a9b95c785112e18b587c029e343cad8834760 (diff)
downloadopenttd-299f34b32bfb2dbaba2dd0cb8865a16afefa2e85.tar.xz
(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'.
Diffstat (limited to 'src')
-rw-r--r--src/depend/depend.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/depend/depend.cpp b/src/depend/depend.cpp
index 79c70f7bf..9c9f201ad 100644
--- a/src/depend/depend.cpp
+++ b/src/depend/depend.cpp
@@ -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()) {