diff --git a/src/submodules/Utility/src/StringUtility@Methods.F90 b/src/submodules/Utility/src/StringUtility@Methods.F90 index d203c916..59386636 100644 --- a/src/submodules/Utility/src/StringUtility@Methods.F90 +++ b/src/submodules/Utility/src/StringUtility@Methods.F90 @@ -346,8 +346,12 @@ INTEGER(I4B) :: n, m n = 0 n = INDEX(char, ".", back=.TRUE.) -m = LEN(char) -ext = CHAR(n + 1:m) +IF (n .EQ. 0) THEN + ext = "" +ELSE + m = LEN(char) + ext = CHAR(n + 1:m) +END IF END PROCEDURE getExtension_chars !----------------------------------------------------------------------------