# HG changeset patch # User rubidium # Date 1243157746 0 # Node ID c2d9b54aaa63e7c7a1aaf0bd9c69ea2dd229dc04 # Parent dae3a822e71b7eaac5af544d5d23fc6ae61e96c5 (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'. diff --git a/src/depend/depend.cpp b/src/depend/depend.cpp --- a/src/depend/depend.cpp +++ b/src/depend/depend.cpp @@ -645,7 +645,7 @@ /* 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()) {