Skip to content

Commit a996ec5

Browse files
committed
Update stdlib_ascii.f90
Solve a glitch in the function is_printable
1 parent 56740fc commit a996ec5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stdlib_ascii.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pure logical function is_printable(c)
145145
character(len=1), intent(in) :: c !! The character to test.
146146
integer :: ic
147147
ic = iachar(c) ! '~'
148-
is_printable = c >= ' ' .and. ic <= int(z'7E')
148+
is_printable = ic >= iachar(' ') .and. ic <= int(z'7E')
149149
end function
150150

151151
!> Checks whether `c` is a lowercase ASCII letter (a .. z).

0 commit comments

Comments
 (0)