Skip to content

Commit 01ba21f

Browse files
committed
logger_fix
1 parent e54f92a commit 01ba21f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/stdlib_logger.f90

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,12 @@ pure subroutine configuration( self, add_blank_line, indent, &
435435
if ( present(indent) ) indent = self % indent_lines
436436
if ( present(max_width) ) max_width = self % max_width
437437
if ( present(time_stamp) ) time_stamp = self % time_stamp
438-
if ( present(log_units) .and. self % units .gt. 0 ) then
439-
log_units = self % log_units(1:self % units)
440-
else
441-
allocate(log_units(0))
438+
if ( present(log_units) ) then
439+
if ( self % units .gt. 0 ) then
440+
log_units = self % log_units(1:self % units)
441+
else
442+
allocate(log_units(0))
443+
end if
442444
end if
443445

444446
end subroutine configuration

0 commit comments

Comments
 (0)