summaryrefslogtreecommitdiff
path: root/src/depend
diff options
context:
space:
mode:
authorglx22 <glx22@users.noreply.github.com>2019-05-10 14:22:07 +0200
committerGitHub <noreply@github.com>2019-05-10 14:22:07 +0200
commit47fdbdd324261dcb6c8cc4e4d7b13fc14ff06311 (patch)
tree729b51faf3828bdb5ca41c8488eb62606b68f91e /src/depend
parentbe53ef24c1ea63772016b3f85e79df99d19c4d13 (diff)
downloadopenttd-47fdbdd324261dcb6c8cc4e4d7b13fc14ff06311.tar.xz
Fix: ignore C++ standard library headers in depend (#7578)
Diffstat (limited to 'src/depend')
-rw-r--r--src/depend/depend.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/depend/depend.cpp b/src/depend/depend.cpp
index 76c186265..5f95ffc42 100644
--- a/src/depend/depend.cpp
+++ b/src/depend/depend.cpp
@@ -507,6 +507,9 @@ private:
*/
const char *GeneratePath(const char *dirname, const char *filename, bool local)
{
+ /* Ignore C++ standard library headers. */
+ if (strchr(filename, '.') == nullptr) return nullptr;
+
if (local) {
if (access(filename, R_OK) == 0) return strdup(filename);