Skip to content

Commit bf8a4a9

Browse files
committed
fix array expansion condition
1 parent 3fcfacf commit bf8a4a9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Utilities/Message.f90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ subroutine store(this, msg, substring)
8080
integer(I4B) :: i, n
8181

8282
! -- resize message array if needed
83-
inc_array = .TRUE.
83+
inc_array = .true.
8484
if (allocated(this%messages)) then
85-
if (this%num_messages >= size(this%messages)) then
86-
inc_array = .FALSE.
85+
if (this%num_messages < size(this%messages)) then
86+
inc_array = .false.
8787
end if
8888
end if
8989
if (inc_array) then
@@ -213,7 +213,7 @@ subroutine write_message(text, iunit, fmt, &
213213
character(len=*), intent(in), optional :: fmt !< format to write the message (default='(a)')
214214
integer(I4B), intent(in), optional :: skipbefore !< number of empty lines before message (default=0)
215215
integer(I4B), intent(in), optional :: skipafter !< number of empty lines after message (default=0)
216-
logical(LGP), intent(in), optional :: advance !< whether to use advancing output (default is .TRUE.)
216+
logical(LGP), intent(in), optional :: advance !< whether to use advancing output (default is .true.)
217217
! -- local
218218
character(len=3) :: cadvance
219219
integer(I4B) :: i
@@ -325,7 +325,7 @@ subroutine write_message_counter(text, iunit, icount, iwidth, &
325325
fmt_cont = '(A)'
326326
len_str1 = 0
327327
len_str2 = len_line
328-
include_counter = .FALSE.
328+
include_counter = .false.
329329
j = 0
330330

331331
! -- process optional arguments
@@ -343,7 +343,7 @@ subroutine write_message_counter(text, iunit, icount, iwidth, &
343343
! -- create the counter to prepend to the start of the message,
344344
! formats, and variables used to create strings
345345
if (present(iwidth) .and. present(icount)) then
346-
include_counter = .TRUE.
346+
include_counter = .true.
347347

348348
! -- write counter
349349
write (cfmt, '(A,I0,A)') '(1x,i', iwidth, ',".",1x)'

0 commit comments

Comments
 (0)