summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()) {