diff --git a/fortran/src/include/constants.f90 b/fortran/src/include/constants.f90 index 95edb0bd..6a5ec563 100644 --- a/fortran/src/include/constants.f90 +++ b/fortran/src/include/constants.f90 @@ -20,7 +20,6 @@ module constants integer, parameter :: ERROR_UTILS_ALLOCATE_FAILED = 5 ! file/string sizes - integer, parameter :: ANSWERS_TSV_SIZE = 2048 integer, parameter :: ANSWERT_STR_SIZE = 16 end module constants diff --git a/fortran/src/include/utils.f90 b/fortran/src/include/utils.f90 index 9d6e56d6..1f086dac 100644 --- a/fortran/src/include/utils.f90 +++ b/fortran/src/include/utils.f90 @@ -17,7 +17,7 @@ type(AnswerT) function get_answer(id) result(answer) if (id < 1 .or. id > size(cached_answers)) then print *, "Error: ID is out of bounds." - answer%type = errort + answer = AnswerT(0, '', errort) return end if @@ -29,14 +29,14 @@ type(AnswerT) function get_answer(id) result(answer) end function subroutine init_answer_cache() - integer(i18t) :: i, j - integer :: ios, line_length, unit_number, file_size character(len=64) :: line character(len=32) :: val character(len=4) :: id_, type_, length + integer(i18t) :: i, j + integer :: ios, line_length, unit_number + cached_answers = AnswerT(0, '', errort) do i=1, size(cached_answers) - cached_answers(i)%type = errort end do unit_number = prev_unit + 1