From 299f34b32bfb2dbaba2dd0cb8865a16afefa2e85 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 24 May 2009 09:35:46 +0000 Subject: (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'. --- src/depend/depend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) { -- cgit v1.2.3-54-g00ecf