diff options
author | Brad Richardson <everythingfunctional@protonmail.com> | 2021-03-23 14:57:06 -0500 |
---|---|---|
committer | Brad Richardson <everythingfunctional@protonmail.com> | 2021-03-23 14:57:06 -0500 |
commit | ccc55fff1abf2e4ae516cf01aabb97f9184e97e4 (patch) | |
tree | 1a879e784b977c372ff730bd10a041b724024983 | |
parent | a6daeb5c4bb6a0e3151b335e406173e79adcb13e (diff) | |
download | fpm-ccc55fff1abf2e4ae516cf01aabb97f9184e97e4.tar.gz fpm-ccc55fff1abf2e4ae516cf01aabb97f9184e97e4.zip |
fix: avoid potential false positives checking for sub_dir
-rw-r--r-- | fpm/src/fpm_targets.f90 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fpm/src/fpm_targets.f90 b/fpm/src/fpm_targets.f90 index e21ed91..2d70b21 100644 --- a/fpm/src/fpm_targets.f90 +++ b/fpm/src/fpm_targets.f90 @@ -409,7 +409,7 @@ function find_module_dependency(targets,module_name,include_dir) result(target_p exit case default if (present(include_dir)) then - if (index(dirname(targets(k)%ptr%source%file_name), include_dir) > 0) then ! source file is within the include_dir or a subdirectory + if (index(dirname(targets(k)%ptr%source%file_name), include_dir) == 1) then ! source file is within the include_dir or a subdirectory target_ptr => targets(k)%ptr exit end if |