Mercurial > hg > openttd
changeset 12004:c2d9b54aaa63 draft
(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'.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 24 May 2009 09:35:46 +0000 |
parents | dae3a822e71b |
children | 68a3fa1a250f |
files | src/depend/depend.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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()) {