From ccc55fff1abf2e4ae516cf01aabb97f9184e97e4 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Tue, 23 Mar 2021 14:57:06 -0500 Subject: fix: avoid potential false positives checking for sub_dir --- fpm/src/fpm_targets.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3