diff --git a/src/error_base.F90 b/src/error_base.F90 index c9bbf663a..4f055e754 100644 --- a/src/error_base.F90 +++ b/src/error_base.F90 @@ -22,7 +22,7 @@ module w90_error_base !! Codify error state with integer code and human readable string type w90_error_type integer :: code - character(len=:), allocatable :: message + character(len=256) :: message contains final :: untrapped_error end type w90_error_type @@ -44,7 +44,7 @@ subroutine set_base_error(err, mesg, code) character(len=*), intent(in) :: mesg integer, intent(in) :: code allocate (err) - err%message = mesg + err%message = trim(mesg) err%code = code end subroutine set_base_error