Skip to content

Commit 4547592

Browse files
committed
fixed error when using non-default ints
Fixes #591
1 parent 2dc8abe commit 4547592

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/json_value_module.F90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11599,7 +11599,9 @@ subroutine json_print_error_message(json,io_unit)
1159911599
write(io_unit,'(A)',iostat=istat) error_msg
1160011600
if (istat/=0) then
1160111601
! in this case, just try to write to the error_unit
11602-
call integer_to_string(io_unit,int_fmt,tmp)
11602+
! [convert to IK integer, we assume this will be ok since
11603+
! normally these io units are default ints]
11604+
call integer_to_string(int(io_unit,IK),int_fmt,tmp)
1160311605
write(error_unit,'(A)',iostat=istat) 'Error writing to unit '//trim(tmp)
1160411606
write(error_unit,'(A)',iostat=istat) error_msg
1160511607
end if

0 commit comments

Comments
 (0)