diff --git a/src/elements.f90 b/src/elements.f90 index 28e0e5e..1195e58 100644 --- a/src/elements.f90 +++ b/src/elements.f90 @@ -225,8 +225,11 @@ module elements exists = .false. do i=1, 10 - if(type == type_to_name(i)) exists = .true. - inttype = i + if(type == type_to_name(i)) then + exists = .true. + inttype = i + exit + end if end do if (exists.eqv..false.) then