From 458209db39589341ccd539aeb9cd0ae0007915d5 Mon Sep 17 00:00:00 2001 From: Tomohiro Degawa Date: Tue, 25 Apr 2023 16:43:30 +0900 Subject: [PATCH] added a presence check for `exists` This commit closes issue #704. --- src/stdlib_hashmap_open.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stdlib_hashmap_open.f90 b/src/stdlib_hashmap_open.f90 index d27441548..979b097e9 100755 --- a/src/stdlib_hashmap_open.f90 +++ b/src/stdlib_hashmap_open.f90 @@ -283,7 +283,7 @@ module subroutine get_other_open_data( map, key, other, exists ) invalid_inmap end if else if ( associated( map % inverse(inmap) % target ) ) then - exists = .true. + if ( present(exists) ) exists = .true. call copy_other( map % inverse(inmap) % target % other, other ) else if ( present(exists) ) then